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;
template <class T>
inline bool Up(T &a, const T &b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool Down(T &a, const T &b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
inline int getus() {
  int tmp, c;
  while (tmp = fgetc(stdin), tmp < '0' || tmp > '9')
    ;
  tmp -= '0';
  while (c = fgetc(stdin), '0' <= c && c <= '9') tmp = tmp * 10 + c - '0';
  return tmp;
}
inline int getint() {
  int tmp, c, flag;
  while (flag = fgetc(stdin), flag != '-' && (flag < '0' || flag > '9'))
    ;
  if (flag == '-')
    tmp = 0;
  else
    tmp = flag - '0';
  while (c = fgetc(stdin), '0' <= c && c <= '9') tmp = tmp * 10 + c - '0';
  return flag == '-' ? -tmp : tmp;
}
struct Seg {
  int i, l, r;
  Seg() : i(0), l(0), r(0) {}
  Seg(int i, int l, int r) : i(i), l(l), r(r) {}
  bool operator<(const Seg &rhs) const {
    if (i != rhs.i) return i < rhs.i;
    if (l != rhs.l) return l < rhs.l;
    return r < rhs.r;
  }
};
bool specialCase = false;
int N, M;
vector<Seg> v, h;
int sgSum = 0;
int ansI = -1, ansL = -1, ansR = -1;
set<int> hs, vs;
vector<Seg> change(vector<Seg> v, int tot) {
  vector<Seg> ans(0);
  int N = v.size();
  sort(v.begin(), v.end());
  for (int l = 0, r; l < N; l = r) {
    int rest = tot;
    for (r = l + 1; r < N && v[l].i == v[r].i; ++r)
      ;
    int left = v[l].l, right = v[l].r;
    for (int i = (l + 1); i < (r); ++i) {
      if (left <= v[i].l && v[i].l <= right)
        Up(right, v[i].r);
      else {
        ans.push_back(Seg(v[l].i, left, right));
        rest -= right - left;
        left = v[i].l;
        right = v[i].r;
      }
    }
    ans.push_back(Seg(v[l].i, left, right));
    rest -= right - left;
    sgSum ^= rest;
  }
  return ans;
}
bool FindStep(vector<Seg> &v, int tot) {
  int N = v.size();
  for (int l = 0, r; l < N; l = r) {
    int rest = tot;
    for (r = l + 1; r < N && v[l].i == v[r].i; ++r)
      ;
    for (int i = (l); i < (r); ++i) rest -= v[i].r - v[i].l;
    if (rest < (sgSum ^ rest)) continue;
    if (specialCase)
      printf("rest = %d, sgSum = %d, xor = %d\n", rest, sgSum, rest ^ sgSum);
    sgSum ^= rest;
    vector<pair<int, int> > vp;
    for (int i = (l); i < (r); ++i)
      vp.push_back(pair<int, int>(v[i].l, v[i].r));
    vp.push_back(pair<int, int>(tot, tot));
    int lastPoint = 0;
    int tmp = vp.size();
    sgSum = rest - sgSum;
    if (specialCase) printf("sgSum = %d\n", sgSum);
    for (int i = (0); i < (tmp); ++i) {
      int len = vp[i].first - lastPoint;
      if (sgSum > len) {
        sgSum -= len;
        lastPoint = vp[i].second;
      } else {
        len = sgSum;
        int right = lastPoint + len;
        ansI = v[l].i;
        ansL = 0;
        ansR = right;
        break;
      }
    }
    return true;
  }
  return false;
}
int findMex(const set<int> &t) {
  int i = 1;
  set<int>::const_iterator itr = t.begin();
  for (;; ++i) {
    if (*itr != i) break;
    if (++itr == t.end()) {
      ++i;
      break;
    }
  }
  return i;
}
int main() {
  int K;
  scanf("%d %d %d", &N, &M, &K);
  while (K--) {
    int x0, y0, x1, y1;
    scanf("%d %d %d %d", &x0, &y0, &x1, &y1);
    if (y0 == y1) {
      if (x0 > x1) swap(x0, x1);
      h.push_back(Seg(y0, x0, x1));
      hs.insert(y0);
    }
    if (x0 == x1) {
      if (y0 > y1) swap(y0, y1);
      v.push_back(Seg(x0, y0, y1));
      vs.insert(x0);
    }
  }
  if ((M - 1 - int(hs.size())) & 1) sgSum ^= N;
  if ((N - 1 - int(vs.size())) & 1) sgSum ^= M;
  h = change(h, N);
  v = change(v, M);
  if (sgSum == 0) {
    puts("SECOND");
    return 0;
  }
  puts("FIRST");
  if ((M - 1 - int(hs.size())) > 0 && (sgSum ^ N) <= N) {
    int y = findMex(hs);
    printf("0 %d %d %d\n", y, N - (sgSum ^ N), y);
    if (specialCase) {
      puts("1");
      printf("%d\n", (M - 1 - int(hs.size())));
    }
    return 0;
  }
  if ((N - 1 - int(vs.size())) > 0 && (sgSum ^ M) <= M) {
    int x = findMex(vs);
    printf("%d 0 %d %d\n", x, x, M - (sgSum ^ M));
    if (specialCase) {
      puts("2");
      printf("%d\n", (N - 1 - int(vs.size())));
    }
    return 0;
  }
  if (FindStep(h, N)) {
    printf("%d %d %d %d\n", ansL, ansI, ansR, ansI);
    return 0;
  }
  if (FindStep(v, M)) {
    printf("%d %d %d %d\n", ansI, ansL, ansI, ansR);
    return 0;
  }
  assert(0);
  puts("WRONG!!!");
  return 0;
}