Problem: This issue is a reactive issue. It is necessary to create a program that derives the correct answer by interactively responding to the program prepared on the server side.





Example

Input




Output

Solution (in CPP):

Solution:
#include "bits/stdc++.h"
using namespace std;

int main() {
	int N, M; 
	scanf("%d %d", &N, &M);
	fflush(stdout);
	int ans = 0;
	for (int i = 0; i < N; ++i) {
		int a;
		printf("lst %d\n", i);
		fflush(stdout);
		scanf("%d", &a);
		ans += (a*(a - 1));
		for (int j = 0; j < a; ++j) {
			int b;
			scanf("%d", &b);
		}
	}
	printf("ans %d\n", ans);
	fflush(stdout);
	return 0;
}