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 <iostream>
using namespace std;
int res;
int k, n, m;
int main(){
    cin >> n >> m;
    for(int i = 0;i < n;i++){
    	cout << "lst " << i << endl;
    	cin >> k;
    	res += k * (k-1);
    	for(int j = 0;j < k;j++)cin >> m;
    }
    cout << "ans " << res <<  endl; // ????????´????????????????????\
	return 0;
}