#include <bits/stdc++.h>
using namespace std;
#define REP(i, a, n) for (int i = (a); i < (int)(n); i++)
#define ALL(obj) (obj).begin(), (obj).end()
#define rALL(obj) (obj).rbegin(), (obj).rend()
using ll = long long;

int main() {
    int A,B,C; cin >> A >> B >> C;
    
    bool c = (C%2 == 0 ? true : false);
    string ans;
    if( A == B ) ans = "=";
    else if( abs(A) == abs(B) && c) ans = "=" ;


    else if( A > B ) {
        if(abs(A) < abs(B) && c) ans = "<";
        else ans = ">";
    }
    else if( A < B ) {
        if(abs(A) > abs(B) && c) ans = ">";
        else ans = "<";
    }



    cout << ans << endl;
    return 0;
}
#include <algorithm>
#include <bitset>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <set>
#include <sstream>
#include <queue>
#include <unordered_map>
#include <unordered_set>
#include <vector>

#define rep(i, n) for (int i = 0; i < n; ++i)
#define reps(i, s, n) for (int i = s; i < n; i++)
#define debug(s, param) std::cerr << s << param << std::endl;

using namespace std;
using ll = long long;
using pi = pair<int, int>;
using pl = pair<ll, ll>;

// 参考にするコード
// https://atcoder.jp/contests/abc199/submissions/22050932

const int INF = 1e9;
const ll INFL = 1e18;
const ll MOD = 1000000007;

int main() {
  int n, m; cin >> n >> m;
  vector<vector<pi>> constraints(n+1);
  rep (i, m) {
    int x, y, z; cin >> x >> y >> z;
    constraints[x].emplace_back(pi(y, z));
  }

  vector<int> popCount(1 << n);
  rep (i, 1 << n) popCount[i] = bitset<18>(i).count();
  vector<ll> dp(1 << n, 0);
  dp[0] = 1;
  rep (S, 1 << n) {
    bool ok = true;
    for (auto [y, z] : constraints[popCount[S]]) {
      int mask = (1 << y) - 1;
      if (popCount[S & mask] > z) {
        ok = false;
        break;
      }
    }
    if (!ok) dp[S] = 0;
    rep (i, n) {
      if (S >> i & 1) continue;
      dp[S | 1 << i] += dp[S];
    }
  }

  cout << dp[(1 << n) - 1] << endl;

  return 0;
}
