#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
const ll mod=998244353;

#define pb push_back

int main() {
    
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);

    ll t,a1,b1;
    string a,b;
        cin>>a>>b;
        a1=stoi(a);
        b1=stoi(b);
        vector<string> c(2);
        for(ll i=0;i<a1;i++)
            c[0]+=b;
        for(ll i=0;i<b1;i++)
            c[1]+=a;
        sort(c.begin(),c.end());
        cout<<c[0];


    return 0;
}

