#pragma GCC optimize("Ofast")
#pragma GCC optimization ("unroll-loops")
#include <bits/stdc++.h>
#define rsrt(v) sort(v.begin(), v.end(), greater<int>())
#define rsrtl(v) sort(v.begin(), v.end(), greater<ll>())
#define fi(i, a, b) for (int i = a; i < b; i++)
#define fll(i, a, b) for (ll i = a; i < b; i++)
#define srt(v) sort(v.begin(), v.end())
#define pb push_back
#define g(v, i, j) get<i>(v[j])
#define vi vector<int>
#define vll vector<ll>
#define pii pair<int, int>
#define pll pair<ll, ll>
#define ll long long
ll md = 1000000007;
#define theartofwar                          \
    ios_base::sync_with_stdio(false); \
    cin.tie(0);                       \
    cout.tie(0);
#define F first
#define S second
#define sz(v) v.size()
using namespace std;
#define dbg(x) cerr << #x << " = " << x << endl;
template <typename T>
T pw(T a, T b){
    T c = 1, m = a;
    while (b){
        if (b & 1) c = (c * m);
        m = (m * m), b /= 2;
    }
    return c;
}
template <typename T>
T ceel(T a, T b){
    if (a % b == 0)
        return a / b;
    else
        return a / b + 1;
}
template <typename T>
T my_log(T n, T b){
    T i = 1, ans = 0;
    while (1){
        if (i > n){
            ans--;
            break;
        }
        if (i == n) break;
        i *= b, ans++;
    }
    return ans;
}
template <typename T>
T gcd(T a, T b){
    if (b == 0)
        return a;
    return gcd(b, a % b);
}
ll pwmd(ll a, ll b){
    ll c = 1, m = a;
    while (b){
        if (b & 1) c = (c * m) % md;
        m = (m * m) % md;
        b /= 2;
    }
    return c;
}
ll modinv(ll n){
    return pwmd(n, md - 2);
}
ll inverse(ll i){
    if (i == 1)
        return 1;
    return (md - ((md / i) * inverse(md % i)) % md + md) % md;
}
bool sortbysec(const pair<ll, ll> &a, const pair<ll, ll> &b){
    return (a.second < b.second);
}
int main()
{
    theartofwar;
    ll a, b, c;
    cin >> a >> b >> c;
    if (c % 2){
        if (a == b) cout << "=";
        else if (a > b) cout << ">";
        else cout << "<";
    }
    else{
        a = abs(a), b = abs(b);
        if (a == b) cout << "=";
        else if (a > b) cout << ">";
        else cout << "<";
    }
}

 //----AUTHOR:kkdrummer----/
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
//#include <boost/multiprecision/cpp_int.hpp> 
//using namespace boost::multiprecision; 
using namespace __gnu_pbds;
using namespace std;
typedef    long long                	 ll;
typedef    long double              	 ld;
typedef    unordered_set<ll>         	 usll;
typedef    unordered_multiset<ll>    	 umsll;
typedef    multiset<ll>              	 msll;
typedef    set<ll>                  	 sll;
typedef    vector<ll>               	 vll;
typedef    pair<ll,ll>              	 pll;
typedef    vector<pll>              	 vpll;
typedef    priority_queue<ll>       	 pqll;
typedef    vector<int>              	 vi;
typedef    set<int>                 	 si;
typedef    multiset<int>            	 msi;
typedef    unordered_multiset<int>  	 umsi;
typedef    unordered_set<int>       	 usi;
typedef    pair<int,int>               	 pi;
typedef    vector<pi>                	 vpi;
typedef    priority_queue<int>       	 pqi;
typedef    tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update>   ind_si;
typedef    tree<ll,null_type,less<ll>,rb_tree_tag,tree_order_statistics_node_update>   ind_sll;
typedef    tree<int,null_type,less_equal<int>,rb_tree_tag,tree_order_statistics_node_update>   ind_msi;
typedef    tree<ll,null_type,less_equal<ll>,rb_tree_tag,tree_order_statistics_node_update>   ind_msll;
#define    in          		insert
#define    fi          		first
#define    se          		second
#define    pb   	    	push_back
#define    mp   	   		make_pair
#define    be   	   		begin
#define    en   	   		end
#define    itr  	   		iterator
#define    io  	       		ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define    mo   	   		998244353
#define    inf  	   		8222372026854775807
#define    ninf   	   		-inf
#define    ima   	   		2047483647
#define    imi   	   		-ima
#define    oncnt       		__builtin_popcount
#define    zerobegin   		__builtin_clz
#define    zeroend    		__builtin_ctz
#define    parity      		__builtin_parity
#define    eps         		1e-9
#define    coutd       		cout<<setprecision(10)<<fixed
#define    mems(dp,x)  		memset(dp,x,sizeof(dp))
#define    fbo         		find_by_order
#define    ook    	   		order_of_key
#define    all(x)      		x.be(),x.en()
#define    upb    	   		upper_bound
#define    lowb  	   		lower_bound 
#define    lte(v,x)    		(upb(all(v),x)-v.be())
#define    gte(v,x)    		(v.end()-lowb(all(v),x))
#define    gt(v,x)     		(v.en()-upb(all(v),x))
#define    lt(v,x)     		(lowb(all(v),x)-v.be())
const      ld PI= 			3.1415926535897932384626433832792884197169399375105820974944;
inline ll mpow(ll x,ll n){if(n==0)return 1;if(x==0)return 0;if(n==1)return(x%mo);ll u=(mpow(x,n/2));u=(u*u)%mo;if(n%2!=0)u=(u*x%mo)%mo;return u;}
inline ll minv(ll x){return mpow(x,mo-2);}
inline ll mmul(ll a,ll b){if(a>=mo)a=a%mo;if(b>=mo)b=b%mo;if(a*b>=mo)return(a*b)%mo;return(a*b);}
inline ll madd(ll a, ll b){if(a>=mo)a=a%mo;if(b>=mo)b=b%mo;if(a+b>=mo)return(a+b)%mo;return(a+b);}
inline ll msub(ll a, ll b){if(a>=mo)a=a%mo;if(b>=mo)b=b%mo;return(((a-b)%mo+mo)%mo);}
inline ll mdiv(ll a,ll bb){if(a>=mo)a=a%mo;ll b=minv(bb);if(b>=mo)b=b%mo;if(a*b>=mo)return(a*b)%mo;return(a*b);}
inline ll gcd(ll a,ll b){return __gcd(a,b);}
inline ll lcm(ll a,ll b){return (a*b)/gcd(a,b);}


ll inta(vll v)
{
	ll c=0;
	for(auto x:v)c=c*10+x;
	return c;
}

ll g1(ll n)
{
	vll v;
	while(n)
	{
		v.pb(n%10);
		n/=10;
	}
	sort(all(v));
	reverse(all(v));
	return inta(v);
}

ll g2(ll n)
{
	vll v;
	while(n)
	{
		v.pb(n%10);
		n/=10;
	}
	sort(all(v));
	//reverse(all(v));
	return inta(v);
}



ll f(ll n)
{
	return g1(n)-g2(n);
}




int main()
{              io 
int testcases=1;           //        cin>>testcases;
while(testcases--)
{


ll n,k;
cin>>n>>k;

for(int i=0;i<k;i++)
	n=f(n);

cout<<n;














































































}return 0;}