#include <bits/stdc++.h>   #pragma GCC optimize( Ofast,unroll-loops )   #pragma GCC target( avx,avx2,sse,sse2 )   using namespace std;   using vi = vector<long long>;   mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());   long long powmod(long long a, long long b, long long mod) {     if (b == 0 || a == 1) {       if (mod == 1)         return 0;       else         return 1;     }     if (b % 2 == 0) {       long long k = powmod(a, b / 2, mod);       return (k * k) % mod;     } else {       long long k = powmod(a, b / 2, mod);       return ((k * k) % mod * a) % mod;     }   }   long long gcd(long long a, long long b) {     if (a == 0) return b;     if (b == 0) return a;     if (a > b)       return gcd(a % b, b);     else       return gcd(b % a, a);   }   long long prime(long long p) {     if (p == 1) return 0;     for (long long i = 2; i * i <= p; i++) {       if (p % i == 0 && i < p) return i;     }     return 1;   }   long long inv(long long a, long long mod) { return powmod(a, mod - 2, mod); }   long long random_modul() {     uniform_int_distribution<long long> u1(1e9, 2e9);     long long pepega = u1(rnd);     while (prime(pepega) != 1) pepega = u1(rnd);     return pepega;   }   template <typename T1>   void ifmax(T1& max, T1 kek) {     if (kek > max) max = kek;     return;   }   template <typename T1>   void ifmin(T1& min, T1 kek) {     if (kek < min) min = kek;     return;   }   template <typename T1>   istream& operator>>(std::istream& in, pair<T1, T1>& a) {     in >> a.first >> a.second;     return in;   }   template <typename T1>   istream& operator>>(std::istream& in, vector<T1>& a) {     for (long long i = 0; i < a.size(); i++) in >> a[i];     return in;   }   template <typename T1>   ostream& operator<<(std::ostream& out, vector<T1>& b) {     for (long long i = 0; i < b.size(); i++) out << b[i];     return out;   }   template <typename T1>   void sort(vector<T1>& m) {     sort(m.begin(), m.end());   }   template <typename T1>   void reverse(vector<T1>& m) {     reverse(m.begin(), m.end());   }   long long mod = 1000000007;   long long fac[200005];   long long inv_fac[200005];   long long co(long long a, long long b) {     long long ans = 1;     ans *= fac[b];     ans *= inv_fac[b - a];     ans %= mod;     ans *= inv_fac[a];     return ans % mod;   }   void solve() {     string a, b;     cin >> a >> b;     long long s1 = a.size();     long long s2 = b.size();     string ans;     for (long long i = 1; i <= s1; i++) {       for (long long j = 1; j <= s2; j++) {         string cur =   ;         for (long long k = 0; k < i; k++) cur += a[k];         for (long long k = 0; k < j; k++) cur += b[k];         if (i == 1 && i == j)           ans = cur;         else           ans = min(ans, cur);       }     }     cout << ans;     return;   }   signed main() {     ios_base::sync_with_stdio(0);     cin.tie(0);     cout.tie(0);     cout << fixed << setprecision(10);     long long multitest = 0;     long long tututu;     tututu = 1;     long long combinatorics = 0;     if (combinatorics) {       fac[1] = 1;       fac[0] = 1;       for (long long i = 2; i < 200005; i++) {         fac[i] = fac[i - 1] * i;         fac[i] %= mod;       }       for (long long i = 0; i < 200005; i++) {         inv_fac[i] = inv(fac[i], mod);       }     }     if (multitest) cin >> tututu;     for (long long qwerty = 0; qwerty < tututu; qwerty++) solve();     return 0;   }   