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 <cstdio>
using namespace std;

int n;
int m;
typedef long long int LLI;
LLI ans;

int main() {
  scanf("%d%d", &n, &m);
  for (int i=0; i<n; i++) {
    printf("lst %d\n", i);
    fflush(stdout);

    LLI k;
    scanf("%lld", &k);

    for (int j=0; j<k; j++) {
      int v;
      scanf("%d", &v);
    }
    ans += k*(k-1);
  }

  printf("ans %lld\n", ans);
    fflush(stdout);
}