#include <iostream>
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */

int main(int argc, char** argv) {
	int x,y;
	cin >> x >> y;
	for(int i = 0; i<y; i++)
	{
		for(int j = 0; j<3; j++)
		{
			cin >> x;
		}
	}
	cin >> x >> y;
	cout << 1;
	return 0;
}