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;
struct pnt {
  int ps, st, en;
  pnt(int ps, int st, int en) : ps(ps), st(st), en(en) {}
  bool operator!=(pnt a) {
    if (ps != a.ps || st != a.st || en != a.en) return 1;
    return 0;
  }
};
bool cmp(pnt a, pnt b) {
  if (a.ps != b.ps) return a.ps < b.ps;
  if (a.st != b.st) return a.st < b.st;
  return a.en < b.en;
}
vector<pnt> merge(vector<pnt> v) {
  sort(v.begin(), v.end(), cmp);
  int i, j, x, st, en;
  vector<pnt> u;
  int sz = v.size();
  for (i = 0; i < sz;) {
    x = v[i].ps, st = v[i].st, en = v[i].en;
    j = i + 1;
    while (j < sz && v[j].ps == x && v[j].st <= en) {
      en = max(en, v[j].en);
      j++;
    }
    u.push_back(pnt(x, st, en));
    i = j;
  }
  return u;
}
vector<pnt> arrange(vector<pnt> u) {
  int i, j, x, len;
  vector<pnt> v;
  int sz = u.size();
  for (i = 0; i < sz;) {
    x = u[i].ps, len = u[i].en - u[i].st;
    j = i + 1;
    while (j < sz && u[j].ps == x) {
      len += u[j].en - u[j].st;
      j++;
    }
    v.push_back(pnt(x, 0, len));
    i = j;
  }
  return v;
}
int find(int x, int len, vector<pnt> v) {
  int i, j, k;
  for (i = 0; i < v.size(); i++)
    if (v[i].ps >= x) break;
  for (j = i; j < v.size(); j++)
    if (v[j].ps > x) break;
  int y = 0;
  for (k = i; k < j; k++) {
    len -= v[k].st - y;
    y = v[k].st;
    if (len <= 0) break;
    y = v[k].en;
  }
  return y + len;
}
int main() {
  int n, m, k;
  scanf("%d%d%d", &n, &m, &k);
  int i, j, sx, sy, ex, ey;
  vector<pnt> x, y;
  for (i = 0; i < k; i++) {
    scanf("%d%d%d%d", &sx, &sy, &ex, &ey);
    if (sx > ex) swap(sx, ex);
    if (sy > ey) swap(sy, ey);
    if (sx == ex)
      x.push_back(pnt(sx, sy, ey));
    else if (sy == ey)
      y.push_back(pnt(sy, sx, ex));
  }
  int ans = 0, cnt;
  x = merge(x);
  vector<pnt> xx = arrange(x);
  for (i = 0; i < xx.size(); i++) ans ^= (m - xx[i].en);
  cnt = n - 1 - xx.size();
  if (cnt & 1) ans ^= m;
  y = merge(y);
  vector<pnt> yy = arrange(y);
  for (i = 0; i < yy.size(); i++) ans ^= (n - yy[i].en);
  cnt = m - 1 - yy.size();
  if (cnt & 1) ans ^= n;
  if (!ans) {
    puts("SECOND");
    return 0;
  }
  puts("FIRST");
  for (i = 0; i < xx.size(); i++)
    if (xx[i].ps != i + 1) break;
  if (i + 1 < n) xx.push_back(pnt(i + 1, 0, 0));
  for (i = 0; i < xx.size(); i++) {
    j = (m - xx[i].en), k = j ^ ans;
    if (j >= k) {
      ex = xx[i].ps;
      ey = find(ex, j - k, x);
      printf("%d %d %d %d\n", ex, 0, ex, ey);
      return 0;
    }
  }
  for (i = 0; i < yy.size(); i++)
    if (yy[i].ps != i + 1) break;
  if (i + 1 < m) yy.push_back(pnt(i + 1, 0, 0));
  for (i = 0; i < yy.size(); i++) {
    j = (n - yy[i].en), k = j ^ ans;
    if (j >= k) {
      ey = yy[i].ps;
      ex = find(ey, j - k, y);
      printf("%d %d %d %d\n", 0, ey, ex, ey);
      return 0;
    }
  }
}