#include <iostream>
#include <vector>

using namespace std;

typedef unsigned long long ull;

namespace uniforming {
  const int MAX_N = 5e4 + 5;
  const int MAX_M = 1e5 + 5;

  int up [MAX_M];
  int dn [MAX_M];
  ull set [MAX_N];
  int can [MAX_N];
  char anss [MAX_M];
  
  void solve (int n, int m) {
    for (int i = 0; i < m; i++) {
      cin >> up[i] >> dn[i];
      up[i]--;
      dn[i]--;
    }

    for (int i = 0; i < n; i += 64) {
      for (int j = 0; j < n; j++) {
        set[j] = 0;
        if (0 <= j - i && j - i < 64) {
          set[j] = 1ULL << (j - i);
        }
      }

      for (int j = m - 1; j >= 0; j--) {
        set[up[j]] |= set[dn[j]];
        set[dn[j]] |= set[up[j]];
      }

      ull inter = ~0ULL;
      for (int j = 0; j < n; j++) {
        inter &= set[j];
      }

      if (inter != 0ULL) {
        int ans = 0;
        while (!(inter & 1)) {
          inter >>= 1;
          ans++;
        }

        ans += i;
        can[ans] = 1;
        for (int j = m - 1; j >= 0; j--) {
          if (can[up[j]]) {
            anss[j] = '^';
            can[dn[j]] = 1;
          } else if (can[dn[j]]) {
            anss[j] = 'v';
            can[up[j]] = 1;
          } else {
            anss[j] = '^';
          }
        }

        for (int j = 0; j < m; j++) {
          cout << anss[j];
        }
        cout << '\n';
        return;
      }
    }

    cout << -1 << endl;
    return;
  }
}

namespace diverging {
  const int MAX_N = 5e4 + 5;
  const int MAX_M = 1e5 + 5;

  int up [MAX_M];
  int dn [MAX_M];
  
  void solve (int n, int m) {
    if (n == 2) {
      cout << -1 << endl;
      return;
    }

    vector<pair<int, int>> smalls;
    for (int i = 0; i < m; i++) {
      cin >> up[i] >> dn[i];
      up[i]--; dn[i]--;
      if (dn[i] <= 2) {
        smalls.push_back(make_pair(up[i], dn[i]));
      }
    }

    int ptr = 0;
    int cur_up = 0, cur_dn = 1;
    if (!smalls.empty() && smalls[0] == make_pair(0, 1)) {
      cur_dn = 2;
    }

    for (int i = 0; i < m; i++) {
      if (dn[i] <= 2) {
        if (ptr + 1 < (int) smalls.size() &&
            make_pair(cur_up, cur_dn) == smalls[ptr + 1]) {
          // switch
          // the thing in common between these two pairs
          int cmn = 0 ^ 1 ^ 2 ^ up[i] ^ dn[i] ^ cur_up ^ cur_dn;
          int oth = up[i] ^ dn[i] ^ cmn;

          if (cur_up == cmn) {
            if (cur_up < oth) {
              cout << 'v';
            } else {
              cout << '^';
            }
            cur_up = oth;
          } else {
            if (cur_dn < oth) {
              cout << 'v';
            } else {
              cout << '^';
            }
            cur_dn = oth;
          }
          if (cur_up > cur_dn) swap(cur_up, cur_dn);
        } else {
          // don't switch
          // the thing in common between these two pairs
          int cmn = 0 ^ 1 ^ 2 ^ up[i] ^ dn[i] ^ cur_up ^ cur_dn;
          int oth = up[i] ^ dn[i] ^ cmn;
          if (cur_up == cmn) {
            if (cur_up < oth) {
              cout << '^';
            } else {
              cout << 'v';
            }
          } else {
            if (cur_dn < oth) {
              cout << '^';
            } else {
              cout << 'v';
            }
          }
        }
        ptr++;
      } else {
        cout << '^';
      }
    }
    cout << '\n';
  }
}

int main () {
  int n, m, T;
  cin >> n >> m >> T;

  if (T == 1) {
    uniforming::solve(n, m);
  } else {
    diverging::solve(n, m);
  }
}


Measured memory_bytes: 5120