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;
  cin>>n>>m;
  
  int ans=0;

  for(int i=0;i<n;i++){
    cout <<"lst "<<i<<endl;
    int a,b;
    cin>>a;
    for(int i=0;i<a;i++) cin>>b;
    ans+=a*(a-1);
  }
  cout <<"ans "<<ans<<endl;
  return 0;
}