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>
#include <vector>

using namespace std;
using ll = long long;
constexpr ll TEN(int n) { return (n == 0) ? 1 : 10LL * TEN(n-1); }

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