#include<bits/stdc++.h>
using namespace std;
struct TreeNode{
    int val;
    TreeNode*left,*right;
    TreeNode(int x):val(x),left(NULL),right(NULL){}
};
TreeNode*insert(TreeNode*root,int x)
{
    if(!root)return new TreeNode(x);
    if(x<root->val)root->left=insert(root->right,x);
    return root;
    void inorder(TreeNode*root){
        if(!root)
        return;
        inorder(root->left);
        cout<<root->val<<"";
        inorder(root->right);
    }
    int main(){
        int N, X;
        cin>>val;
        root=insert(root,val);
    }
    root=insert(root,x);
    inorder(root);
    return0;
    }