#include <bits/stdc++.h>
#include<string>
using namespace std;
#define fio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define ll long long
#define ull unsigned long long
#define ui unsigned int
#define vi vector<int>
#define pb push_back
#define ld long double
#define mp make_pair
#define pii pair<int,int>

int main() {
        fio;
        int a,b;
        cin>>a>>b;
        string s1,s2;
        for(int i=0;i<b;i++)
        s1+=to_string(a);
        
        for(int i=0;i<a;i++)
        s2+=to_string(b);
        
        if(!lexicographical_compare(s1.begin(),s1.end(), s2.begin(), s2.end()))
        cout<<s2<<endl;
        else
        cout<<s1<<endl;
        

 }

