#pragma GCC optimize ("O3")
#pragma GCC target ("avx")
#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define LL long long
#define DB double
#define BS bitset
#define VE vector
#define VL vector<LL>
#define VP vector<pair<LL,LL>>
#define VVL vector<vector<LL>>
#define PQ priority_queue<LL>
#define PQS priority_queue<LL, vector<LL>, greater<LL>>
#define PB push_back
#define POB pop_back
#define PF push_front
#define POF pop_front
#define MP make_pair
#define TS to_string
#define TU to_ullong
#define FOR(i,a,n) for(i=a;i<n;i++)
#define rep(i,n) FOR(i,0,n)
#define ALL(a) a.begin(),a.end()
#define RALL(a) a.rbegin(),a.rend()
#define SORT(a) sort(ALL(a))
#define REV(a) reverse(ALL(a))
#define UB(a,n) *upper_bound(ALL(a),n)
#define LB(a,n) *lower_bound(ALL(a),n)
#define INF 1145141919810364364
#define PI 3.14159265358979
#define MOD 1000000007
//#define MOD 998244353
#define ERR 0.00000000000001
#define NUM 200010

void yn(LL a){if(a)printf("Yes\n");else printf("No\n");}
void YN(LL a){if(a)printf("YES\n");else printf("NO\n");}
LL pwmn(LL a,LL n){LL ans=1;while(ans<a)ans*=n;return ans;}
LL GCD(LL a,LL b){LL c=1,tmp=max(a,b);b=min(a,b);a=tmp;while(c!=0){c=a%b;a=b;b=c;}return a;}
LL LCM(LL a,LL b){return a*b/GCD(a,b);}
LL mod(LL a,LL m){if(a<0)return a%m+m;else return a%m;}
LL DIV(LL a,LL d){LL m=MOD,x=1,y=0,k;while(m){k=d/m;d-=k*m;swap(m,d);x-=k*y;swap(x,y);}return mod(a*mod(x,MOD),MOD);}
LL FAC(LL a){LL i,ans=1;FOR(i,1,a+1){ans*=i;if(MOD>0&&ans>MOD)ans%=MOD;}return ans;}
LL POW(LL a,LL n){LL ans=1;while(n>0){if(n&1)ans=ans*a%MOD;a=a*a%MOD;n>>=1;}return ans;}
LL fact[NUM],finv[NUM],inv[NUM];
void comi(){LL i;fact[0]=fact[1]=1;finv[0]=finv[1]=1;inv[1]=1;FOR(i,2,NUM){fact[i]=fact[i-1]*i%MOD;inv[i]=MOD-inv[MOD%i]*(MOD/i)%MOD;finv[i]=finv[i-1]*inv[i]%MOD;}}
LL com(LL n,LL k){if(n<k||n<0||k<0)return 0;return fact[n]*(finv[k]*finv[n-k]%MOD)%MOD;}
template<typename T>bool chmax(T &a,T b){if(a<b){a=b;return true;}return false;}
template<typename T>bool chmin(T &a,T b){if(a>b){a=b;return true;}return false;}

int main(){
  LL N,M,T,i,j,a=0;
  VL x(100005),y(100005),kf(50005),kn(50005);
  BS<100005> ans;
  VE<BS<50005>> f(50005);
  cin>>N>>M>>T;
  rep(i,M)cin>>x[i]>>y[i];
  if(T==1){
    FOR(i,1,N+1)f[i][i]=1;
    rep(i,M)f[x[i]]=f[y[i]]=f[x[i]]|f[y[i]];
    FOR(i,1,N+1){
      if(f[i].count()!=N)continue;
      f[i].reset();
      f[i][i]=1;
      for(j=M-1;j>=0;j--){
        if(f[i].test(x[j]))f[i][y[j]]=1,ans[j]=1;
        else if(f[i].test(y[j]))f[i][x[j]]=1,ans[j]=0;
        else ans[j]=0;
      }
      if(f[i].count()==N)a=1;
      if(a==1){
        rep(i,M)cout<<(ans.test(i)?'^':'v');
        return 0;
      }
    }
    cout<<-1<<endl;
  }else{
    FOR(i,1,N+1)kf[i]=i,kn[i]=1;
    for(i=M-1;i>=0;i--){
      if(kn[kf[x[i]]]>kn[kf[y[i]]]){
        ans[i]=0;
        kn[kf[x[i]]]--,kn[kf[y[i]]]++;
        kf[x[i]]=kf[y[i]];
      }else{
        ans[i]=1;
        kn[kf[x[i]]]++,kn[kf[y[i]]]--;
        kf[y[i]]=kf[x[i]];
      }
    }
    FOR(i,1,N+1)if(kn[i]>0)a++;
    if(a>1)rep(i,M)cout<<(ans.test(i)?'^':'v');
    else printf("-1");
  }

	return 0;
}
