Problem: Two players play the following game. Initially, the players have a knife and a rectangular sheet of paper, divided into equal square grid cells of unit size. The players make moves in turn, the player who can't make a move loses. In one move, a player can take the knife and cut the paper along any segment of the grid line (not necessarily from border to border). The part of the paper, that touches the knife at least once, is considered cut. There is one limit not to turn the game into an infinite cycle: each move has to cut the paper, that is the knife has to touch the part of the paper that is not cut before.

Obviously, the game ends when the entire sheet is cut into 1 × 1 blocks. During the game, the pieces of the sheet are not allowed to move. It is also prohibited to cut along the border. The coordinates of the ends of each cut must be integers.

You are given an n × m piece of paper, somebody has already made k cuts there. Your task is to determine who will win if the players start to play on this sheet. You can consider that both players play optimally well. If the first player wins, you also need to find the winning first move.

Input

The first line contains three integers n, m, k (1 ≤ n, m ≤ 109, 0 ≤ k ≤ 105) — the sizes of the piece of paper and the number of cuts. Then follow k lines, each containing 4 integers xbi, ybi, xei, yei (0 ≤ xbi, xei ≤ n, 0 ≤ ybi, yei ≤ m) — the coordinates of the ends of the existing cuts. 

It is guaranteed that each cut has a non-zero length, is either vertical or horizontal and doesn't go along the sheet border.

The cuts may intersect, overlap and even be the same. That is, it is not guaranteed that the cuts were obtained during any correct game.

Output

If the second player wins, print "SECOND". Otherwise, in the first line print "FIRST", and in the second line print any winning move of the first player (the coordinates of the cut ends, follow input format to print them).

Examples

Input

2 1 0


Output

FIRST
1 0 1 1


Input

2 2 4
0 1 2 1
0 1 2 1
1 2 1 0
1 1 1 2


Output

SECOND

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
const long long UNDEF = -1;
const long long INF = 1e18;
template <typename T>
inline bool chkmax(T &aa, T bb) {
  return aa < bb ? aa = bb, true : false;
}
template <typename T>
inline bool chkmin(T &aa, T bb) {
  return aa > bb ? aa = bb, true : false;
}
static char stdinBuffer[1024];
static char *stdinDataEnd = stdinBuffer + sizeof(stdinBuffer);
static const char *stdinPos = stdinDataEnd;
void readAhead(size_t amount) {
  size_t remaining = stdinDataEnd - stdinPos;
  if (remaining < amount) {
    memmove(stdinBuffer, stdinPos, remaining);
    size_t sz = fread(stdinBuffer + remaining, 1,
                      sizeof(stdinBuffer) - remaining, stdin);
    stdinPos = stdinBuffer;
    stdinDataEnd = stdinBuffer + remaining + sz;
    if (stdinDataEnd != stdinBuffer + sizeof(stdinBuffer)) *stdinDataEnd = 0;
  }
}
int rint() {
  readAhead(16);
  int x = 0;
  bool neg = false;
  while (*stdinPos == ' ' || *stdinPos == '\n') ++stdinPos;
  if (*stdinPos == '-') {
    ++stdinPos;
    neg = true;
  }
  while (*stdinPos >= '0' && *stdinPos <= '9') {
    x *= 10;
    x += *stdinPos - '0';
    ++stdinPos;
  }
  return neg ? -x : x;
}
char rch() {
  readAhead(16);
  while (*stdinPos == ' ' || *stdinPos == '\n') ++stdinPos;
  char ans = *stdinPos;
  ++stdinPos;
  return ans;
}
long long rlong() {
  readAhead(32);
  long long x = 0;
  bool neg = false;
  while (*stdinPos == ' ' || *stdinPos == '\n') ++stdinPos;
  if (*stdinPos == '-') {
    ++stdinPos;
    neg = true;
  }
  while (*stdinPos >= '0' && *stdinPos <= '9') {
    x *= 10;
    x += *stdinPos - '0';
    ++stdinPos;
  }
  return neg ? -x : x;
}
int nim(int x) { return x; }
map<int, map<int, int> > g[2];
map<int, vector<pair<int, int> > > z[2];
int lim[2];
map<int, pair<int, int> > h;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  lim[0] = rint(), lim[1] = rint();
  int k = rint();
  for (int i = 0; i < k; i++) {
    int xb = rint(), yb = rint(), xe = rint(), ye = rint();
    if (xb == xe) {
      if (yb > ye) swap(yb, ye);
      g[0][xb][yb]++;
      g[0][xb][ye]--;
    } else {
      if (xb > xe) swap(xb, xe);
      g[1][yb][xb]++;
      g[1][yb][xe]--;
    }
  }
  int nimber = 0;
  for (int t = 0; t < 2; t++)
    for (auto &o : g[t]) {
      int cnt = 0;
      int last = 0;
      int sumlen = 0;
      for (auto &w : o.second) {
        int oldcnt = cnt;
        int pos = w.first;
        cnt += w.second;
        if (oldcnt == 0 && cnt > 0) {
          int len = pos - last;
          if (len) {
            z[t][o.first].push_back(make_pair(last, pos));
            sumlen += len;
          }
        }
        if (oldcnt > 0 && cnt == 0) {
          last = pos;
        }
      }
      {
        int pos = lim[t ^ 1];
        int len = pos - last;
        if (len) {
          z[t][o.first].push_back(make_pair(last, pos));
          sumlen += len;
        }
      }
      h[sumlen] = make_pair(t, o.first);
      nimber ^= sumlen;
    }
  for (int t = 0; t < 2; t++) {
    int unseen = lim[t] - 1 - g[t].size();
    int num = lim[t ^ 1];
    if (unseen & 1) nimber ^= num;
    if (unseen > 0) {
      int have = -1;
      int want = 1;
      for (auto &w : g[t]) {
        if (want != w.first) {
          have = want;
          break;
        }
        want++;
      }
      if (have == -1) have = lim[t] - 1;
      assert(g[t].count(have) == 0);
      h[num] = make_pair(t, have);
      z[t][have].push_back(make_pair(0, lim[t ^ 1]));
    }
  }
  if (nimber == 0) {
    printf("SECOND\n");
  } else {
    printf("FIRST\n");
    for (auto w : h) {
      int len = w.first;
      int go = len ^ nimber;
      if (go > len) continue;
      int rm = len - go;
      int t = w.second.first;
      int o = w.second.second;
      int solution = -1;
      for (auto &q : z[t][o]) {
        int start = q.first, end = q.second;
        if (rm <= end - start) {
          solution = start + rm;
          break;
        } else
          rm -= end - start;
      }
      assert(solution != -1);
      if (t == 0) {
        printf("%d %d %d %d\n", o, 0, o, solution);
      } else {
        printf("%d %d %d %d\n", 0, o, solution, o);
      }
      return 0;
    }
  }
}