#include <bits/stdc++.h>
using namespace std;
const int N = 1005;
int n, m, kk, deg[N], id[N], l = 1, r, idx, tp[N];
vector<int> v[N];
int vis[1 << 20];
struct Mov {
  int x, y, z;
} mov[N * 5];
char s[N];
int find(int st) {
  queue<int> q;
  q.push(st);
  while (!q.empty()) {
    int nd = q.front();
    q.pop();
    if (!vis[nd]) return nd;
    for (int i = 0; i < kk; i++) q.push(nd ^ (1 << i));
  }
  return -1;
}
inline void add(int x, int y, int z) { mov[++idx] = {x, y, z}; }
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> m;
  int T;
  cin >> T;
  kk = min(n, 20);
  int t1, t2;
  for (int i = 1; i <= m; i++) cin >> t1 >> t2, v[t1].push_back(t2), ++deg[t2];
  for (int i = 1; i <= n; i++)
    if (!deg[i]) tp[++r] = i;
  while (l <= r) {
    int p = tp[l++];
    for (auto &i : v[p])
      if (!--deg[i]) tp[++r] = i;
  }
  reverse(tp + 1, tp + n + 1);
  for (int i = 1; i <= kk; i++) {
    id[tp[i]] = i;
    for (int j = 1; j < i; j++) add(1, tp[i], tp[j]);
  }
  for (int j = kk + 1; j <= n; j++) {
    int nd = tp[j];
    add(1, nd, nd);
    int st = 0;
    for (auto &i : v[nd])
      if (id[i]) st |= 1 << (id[i] - 1);
    int tmp = find(st);
    vis[tmp] = nd;
    for (int i = 0; i < kk; i++)
      if (((tmp ^ st) >> i) & 1) add((tmp >> i) & 1, nd, tp[i + 1]);
  }
  cout << idx << endl;
  for (int i = 1; i <= idx; i++)
    cout << (mov[i].x ? "+ " : "- ") << mov[i].y << ' ' << mov[i].z << endl;
  while (T--) {
    int st = 0, ans = 0;
    for (int i = 1; i <= kk; i++) {
      cout << "? 1 " << tp[i] << endl;
      cin >> (s + 1);
      if (s[1] == 'L') {
        ans = tp[i];
        break;
      } else if (s[1] == 'W')
        st |= 1 << (i - 1);
    }
    cout << "! " << (ans ? ans : vis[st]) << endl;
    cin >> (s + 1);
  }
  return 0;
}
