#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

#define reps(i,s,n) for(int i = s; i < n; i++)
#define rep(i,n) reps(i,0,n)

ll N, M, T;

//ll A[50001/64 + 1][50001];
ll A[50001][50001/64 + 1];
int B[50001], cnt[50001];

int detect_ok(){ 
    rep(k, N/64 + 1){
        ll total = 0xffffffffffffffffLL;
        rep(i, N){
            //total &= A[k][i];
            total &= A[i][k];
        }
        rep(j, 64){
            if (total & (1LL << j)){
                return k * 64 + j;
            }
        }
    }
    return -1;
}

int main()
{
    cin >> N >> M >> T;
    vector<ll> X(M), Y(M);
    
    rep(i, M){
        ll x, y;
        cin >> x >> y;
        X[M - 1 - i] = x - 1;
        Y[M - 1 - i] = y - 1;
    }
    
    if (T == 1){
        
        //rep(i, N)A[i/64][i] = 1LL << (i%64);
        rep(i, N)A[i][i/64] = 1LL << (i%64);
        
        
        rep(i, M){
            ll x = X[i];
            ll y = Y[i];
            rep(k, N/64 + 1){
                //A[k][x] = A[k][x] | A[k][y];
                //A[k][y] = A[k][x];
                A[x][k] = A[x][k] | A[y][k];
                A[y][k] = A[x][k];

            }
        }
        //rep(i, N)
        //fprintf(stderr, "A[0][%d] = %d\n", i, A[0][i]);
        int res = detect_ok();
        if (res == -1){
            cout << -1;
            return 0;
        }
        string str = "";
        B[res] = 1;
        rep(i, M){
            ll x = X[i];
            ll y = Y[i];
            if (B[x] == 0){
                str += "v";
            } else {
                str += "^";
            }
            if (B[x] + B[y])B[x] = B[y] = 1;
        }
        reverse(str.begin(), str.end());
        cout << str;
        return 0;
    } 
    // T = 2;
    if (N == 2){
        cout << -1;
        return 0;
    }
    rep(i, N){
        B[i] = i;
        cnt[i]++;
    }
    string str = "";
    rep(i, M){
        ll x = X[i];
        ll y = Y[i];
        if (cnt[B[x]] >= 2){
            str += "v";
            cnt[B[x]]--;
            cnt[B[y]]++;
            B[x] = B[y];
        } else {
            str += "^";
            cnt[B[x]]++;
            cnt[B[y]]--;
            B[y] = B[x];
        }
    }
    reverse(str.begin(), str.end());
    cout << str;
        
    return 0;
}
