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;
namespace LYYY {
int read() {
  int s = 0;
  char c = getchar();
  int f = 1;
  while (c < 48 || c > 57) {
    if (c == 45) f = -1;
    c = getchar();
  }
  while (c >= 48 && c <= 57) s = (s << 3) + (s << 1) + (c ^ 48), c = getchar();
  return s * f;
}
void write(int x) {
  if (x >= 10) write(x / 10);
  putchar(x % 10 + 48);
}
void W(int x) {
  if (x < 0) x = -x, putchar(45);
  write(x);
}
}  // namespace LYYY
using namespace LYYY;
const int maxn = 111111;
struct hhh {
  int Id, ll, rr;
} Q[2][maxn];
pair<int, int> RST[2][maxn];
int N, M, K, cnt[2], tot[2];
bool cmp(const hhh &x, const hhh &y) {
  return x.Id == y.Id ? x.ll < y.ll : x.Id < y.Id;
}
int Get(int x) {
  for (int i = 30; ~i; --i)
    if (x >= (1 << i)) return 1 << i;
  return -1;
}
int fnd0() {
  int lst = 0;
  for (int i = 1; i <= cnt[0]; ++i)
    if (Q[0][i].Id && Q[0][i].Id < N) {
      if (Q[0][i].Id != lst) {
        if (Q[0][i].Id != lst + 1) return lst + 1;
        lst = Q[0][i].Id;
      }
    }
  if (lst + 1 < N) return lst + 1;
  return 0;
}
int fnd1() {
  int lst = 0;
  for (int i = 1; i <= cnt[1]; ++i)
    if (Q[1][i].Id && Q[1][i].Id < M) {
      if (Q[1][i].Id != lst) {
        if (Q[1][i].Id != lst + 1) return lst + 1;
        lst = Q[1][i].Id;
      }
    }
  if (lst + 1 < M) return lst + 1;
  return 0;
}
int main() {
  N = read(), M = read(), K = read();
  for (int i = 1; i <= K; ++i) {
    int a = read(), b = read(), c = read(), d = read();
    if (a == c)
      Q[0][++cnt[0]] = (hhh){a, min(b, d), max(b, d)};
    else
      Q[1][++cnt[1]] = (hhh){b, min(a, c), max(a, c)};
  }
  Q[0][cnt[0] + 1].Id = Q[1][cnt[1] + 1].Id = -1;
  sort(Q[0] + 1, Q[0] + 1 + cnt[0], cmp);
  sort(Q[1] + 1, Q[1] + 1 + cnt[1], cmp);
  int ans = 0;
  if (M % 2 == 0) ans ^= N;
  if (N % 2 == 0) ans ^= M;
  for (int i = 1, Mx = -1, rst = M, Mn = -1; i <= cnt[0]; ++i)
    if (Q[0][i].Id && Q[0][i].Id < N) {
      int id = Q[0][i].Id, l = Q[0][i].ll, r = Q[0][i].rr;
      if (l > Mx) {
        rst -= Mx - Mn;
        Mx = r, Mn = l;
      } else
        Mx = max(Mx, r);
      if (id != Q[0][i + 1].Id) {
        RST[0][++tot[0]] = make_pair(i, rst -= Mx - Mn);
        ans ^= M ^ rst;
        Mx = -1, Mn = -1, rst = M;
      }
    }
  for (int i = 1, Mx = -1, rst = N, Mn = -1; i <= cnt[1]; ++i)
    if (Q[1][i].Id && Q[1][i].Id < M) {
      int id = Q[1][i].Id, l = Q[1][i].ll, r = Q[1][i].rr;
      if (l > Mx) {
        rst -= Mx - Mn;
        Mx = r, Mn = l;
      } else
        Mx = max(Mx, r);
      if (id != Q[1][i + 1].Id) {
        RST[1][++tot[1]] = make_pair(i, rst -= Mx - Mn);
        ans ^= N ^ rst;
        Mx = -1, Mn = -1, rst = N;
      }
    }
  if (!ans) {
    puts("SECOND");
    return 0;
  }
  puts("FIRST");
  int op = Get(ans), op1 = fnd0(), op2 = fnd1();
  if (op2 && (op & N)) {
    op = N - (N ^ ans);
    printf("0 %d %d %d", op2, op, op2);
    return 0;
  }
  if (op1 && (op & M)) {
    op = M - (M ^ ans);
    printf("%d 0 %d %d", op1, op1, op);
    return 0;
  }
  int flg = 0;
  for (int i = 1; i <= tot[0]; ++i)
    if (RST[0][i].second & op) {
      op = i;
      flg = 1;
      break;
    }
  if (!flg) {
    for (int i = 1; i <= tot[1]; ++i)
      if (RST[1][i].second & op) {
        op = i;
        flg = 2;
        break;
      }
  }
  --flg;
  ans = RST[flg][op].second - (RST[flg][op].second ^ ans);
  op = RST[flg][op].first;
  int opl = op;
  for (int i = op - 1; i; --i)
    if (Q[flg][i].Id == Q[flg][op].Id) opl = i;
  int R = 0, r = 0;
  for (int i = opl; i <= op; ++i) {
    if (Q[flg][i].ll > r) {
      int uuu = min(Q[flg][i].ll - r, ans);
      ans -= uuu;
      R = r + uuu;
      if (!ans) break;
      r = Q[flg][i].rr;
    } else
      r = max(r, Q[flg][i].rr);
  }
  if (ans) R = r + ans;
  if (flg)
    printf("0 %d %d %d", Q[flg][op].Id, R, Q[flg][op].Id);
  else
    printf("%d 0 %d %d", Q[flg][op].Id, Q[flg][op].Id, R);
  return 0;
}