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;
#define MAX_N 105

int N,M,ans=0;
int t[MAX_N];

int main(){
  cin>>N>>M;
  for(int i=0;i<N;i++){
    cout<<"lst "<<i<<endl;
    int k,a;
    cin>>k;
    ans+=k*(k-1);
    for(int j=0;j<k;j++)cin>>a;
    t[i]=k;
  }
  cout<<"ans "<<ans<<endl;
  return 0;
}