#include <bits/stdc++.h>
using namespace std;
const int N = 1005;
int n, m, T;
int e[N][N], q[N], deg[N];
int id[N], adj[N];
void topo() {
  for (int i = (int)(1); i <= (int)(n); i++)
    for (int j = (int)(1); j <= (int)(n); j++)
      if (e[i][j]) ++deg[j];
  int h = 0, t = 0;
  for (int i = (int)(1); i <= (int)(n); i++)
    if (!deg[i]) q[++t] = i;
  while (h != t) {
    int x = q[++h];
    for (int i = (int)(1); i <= (int)(n); i++)
      if (e[x][i])
        if (!--deg[i]) q[++t] = i;
  }
}
int q2[5005];
int vi[1 << 20 | 5];
void build() {
  *q = 0;
  vector<pair<int, int> > opt;
  int p1 = max(1, n - 19), m = n - p1 + 1;
  q2[++*q2] = 0;
  for (int i = (int)(0); i <= (int)(m - 1); i++) q2[++*q2] = 1 << i;
  for (int i = (int)(0); i <= (int)(m - 1); i++)
    for (int j = (int)(i + 1); j <= (int)(m - 1); j++)
      q2[++*q2] = (1 << i) | (1 << j);
  for (int i = (int)(0); i <= (int)(m - 1); i++)
    for (int j = (int)(i + 1); j <= (int)(m - 1); j++)
      for (int k = (int)(j + 1); k <= (int)(m - 1); k++)
        q2[++*q2] = (1 << i) | (1 << j) | (1 << k);
  for (int i = (int)(p1); i <= (int)(n); i++)
    for (int j = (int)(i + 1); j <= (int)(n); j++)
      if (!e[q[i]][q[j]]) opt.push_back(pair<int, int>(q[i], q[j]));
  for (int i = (int)(p1); i <= (int)(n); i++) {
    id[q[i]] = adj[q[i]] = 1 << (n - i);
    vi[id[q[i]]] = 1;
  }
  for (int i = (int)(1); i <= (int)(p1 - 1); i++) {
    int x = q[i];
    opt.push_back(pair<int, int>(x, x));
    for (int j = (int)(1); j <= (int)(n); j++)
      if (e[x][j] && id[j]) adj[x] |= id[j];
    for (int j = (int)(1); j <= (int)(*q2); j++)
      if (!vi[adj[x] ^ q2[j]]) {
        adj[x] ^= q2[j];
        vi[adj[x]] = 1;
        for (int p = (int)(p1); p <= (int)(n); p++)
          if (q2[j] & id[q[p]]) opt.push_back(pair<int, int>(x, q[p]));
        break;
      }
  }
  printf("%d\n", opt.size());
  for (auto i : opt)
    if (e[i.first][i.second])
      printf("- %d %d\n", i.first, i.second);
    else
      printf("+ %d %d\n", i.first, i.second);
  fflush(stdout);
}
void solve() {
  int p1 = max(1, n - 19), m = n - p1 + 1, vadj = 0;
  for (int i = (int)(p1); i <= (int)(n); i++) {
    printf("? 1 %d\n", q[i]);
    fflush(stdout);
    char s[10];
    scanf("%s", s + 1);
    if (s[1] == 'L') {
      printf("! %d\n", q[i]);
      fflush(stdout);
      scanf("%s", s + 1);
      return;
    }
    if (s[1] == 'W') vadj |= id[q[i]];
  }
  for (int i = (int)(1); i <= (int)(n); i++)
    if (adj[i] == vadj) printf("! %d\n", i);
  fflush(stdout);
  char s[10];
  scanf("%s", s + 1);
}
int main() {
  scanf("%d%d%d", &n, &m, &T);
  for (int i = (int)(1); i <= (int)(m); i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    e[x][y] = 1;
  }
  topo();
  build();
  while (T--) solve();
}
