#include <bits/stdc++.h>
using namespace std;

int a[1111111];
int n;

int main() {
    freopen("match.in", "w", stdout);
    printf("%d %d\n", 1, n = 15);
    for (int i = 1; i <= n; i++) a[i] = i;
    random_shuffle(a + 1, a + n + 1);
    for (int i = 1; i <= n; i++) printf("%d ", a[i]);
    puts("");
    
    random_shuffle(a + 1, a + n + 1);
    for (int i = 1; i <= n; i++) printf("%d ", a[i]);
    puts("");

    printf("%d\n",0);
}