/**
 * Author: Sergey Kopeliovich (Burunduk30@gmail.com)
 * Date: 2013.09.29
 */

#include <cstdio>
#include <cassert>

#include "random.h"

#define forn(i, n) for (int i = 0; i < (int)(n); i++)

const int X = (int)1e9;
const int N =  1000;

int n, q;

void add( int p )
{
  printf("+ i %d %d", p + 1, n - 1);
  forn(i, n - 1)
    printf(" %d", (p + i + 1) % n + 1);
  puts("");
}

void del( int p )
{
  printf("- o %d %d", p + 1, n - 1);
  forn(i, n - 1)
    printf(" %d", (p + i + 1) % n + 1);
  puts("");
}

int main( int argc, char *argv[] )
{
  if (argc < 4)
  {
    puts("Usage: <seed for random> <n> <q>");
    puts("  [seed == 0] => Time()");
    return 1;
  }

  int seed = atoi(argv[1]);
  n = atoi(argv[2]);
  q = atoi(argv[3]);

  assert(n <= N);
  if (seed == 0)
    seed = Time(), fprintf(stderr, "seed = %d\n", seed);
  initrand(seed);

  printf("%d %d %d %d\n", n, q, R(1, X / 2 - 1) * 2 + 1, R(1, X / 2 - 1) * 2 + 1);
  
  q -= n - 1;
  forn(i, n - 1)
  {
    printf("+ o %d %d", i + 1, n - i - 1);
    forn(j, n - i - 1)
      printf(" %d", i + j + 2);
    puts("");
  }

  int p = 0;
  while (q)
  {
    if (q) del(p), q--;
    if (q) add(p), q--;
    p = (p + 1) % n;
  }
  return 0;
}
