#include using namespace std; int main() { long k, m, n; cin >> k >> m >> n; assert(1 <= k && k <= 6); assert(1 <= m && m <= k * k * k); assert(1 <= n && n <= 1000000000000000000); vector> c; for (int i = 0; i < m; i++) { long p, q, r; cin >> p >> q >> r; assert(1 <= p && p <= k); assert(1 <= q && q <= k); assert(1 <= r && r <= k); c.emplace_back(p, q, r); } sort(c.begin(), c.end()); for (int i = 0; i < m - 1; i++) { assert(c.at(i) != c.at(i + 1)); } }