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 N = 100010;
struct Seg {
  int f, t, a, b;
} s[N];
bool cmp(const Seg &a, const Seg &b) {
  if (a.f != b.f) return a.f < b.f;
  if (a.t != b.t) return a.t < b.t;
  if (a.a != b.a) return a.a < b.a;
  return a.b < b.b;
}
vector<pair<int, int> > cn, cm, z;
int n, m;
void doit(int a, int b) {
  int now = a, nowy = s[a].b, ans = 0;
  for (int i = a + 1; i <= b; i++) {
    if (s[i].a > nowy) {
      ans += nowy - s[now].a;
      now = i, nowy = s[i].b;
    } else {
      nowy = max(nowy, s[i].b);
    }
  }
  ans += (nowy - s[now].a);
  if (s[a].f == 0)
    cm.push_back(make_pair(m - ans, s[a].t));
  else
    cn.push_back(make_pair(n - ans, s[a].t));
}
void output(int f, int p, int q) {
  if (f == 0) {
    printf("%d %d %d %d\n", p, 0, p, q);
  } else
    printf("%d %d %d %d\n", 0, p, q, p);
}
void find(int f, int p, int v, int k) {
  for (int i = 0; i < k; i++) {
    if (s[i].f == f && s[i].t == p) {
      z.push_back(make_pair(s[i].a, s[i].b));
    }
  }
  int now = 0, g = 0;
  for (int i = 0; i < z.size(); i++) {
    g += max(0, z[i].first - now);
    now = max(now, z[i].second);
    if (g >= v) {
      output(f, p, z[i].first + v - g);
      return;
    }
  }
  output(f, p, now + v - g);
}
int main() {
  int k;
  scanf("%d%d%d", &n, &m, &k);
  int mx = 1, my = 1;
  for (int i = 0; i < k; i++) {
    int x1, y1, x2, y2;
    scanf("%d%d%d%d", &x1, &y1, &x2, &y2);
    if (x1 == x2) {
      s[i].f = 0, s[i].t = x1, s[i].a = min(y1, y2), s[i].b = max(y1, y2);
    } else {
      s[i].f = 1, s[i].t = y1, s[i].a = min(x1, x2), s[i].b = max(x1, x2);
    }
  }
  sort(s, s + k, cmp);
  for (int i = 0; i < k; i++) {
    if (s[i].f == 0 && s[i].t == mx)
      mx++;
    else if (s[i].f == 1 && s[i].t == my)
      my++;
  }
  int now = 0;
  for (int i = 1; i < k; i++) {
    if (s[i].f == s[now].f && s[i].t == s[now].t) continue;
    doit(now, i - 1);
    now = i;
  }
  if (k > 0) doit(now, k - 1);
  now = 0;
  int temp = (m - (int)cn.size());
  if (temp % 2 == 0) now ^= n;
  temp = (n - (int)cm.size());
  if (temp % 2 == 0) now ^= m;
  for (int i = 0; i < cn.size(); i++) now ^= cn[i].first;
  for (int i = 0; i < cm.size(); i++) now ^= cm[i].first;
  if (now == 0)
    printf("SECOND\n");
  else {
    printf("FIRST\n");
    for (int i = 0; i < cn.size(); i++) {
      int tt = now;
      if ((tt ^ cn[i].first) <= cn[i].first) {
        find(1, cn[i].second, cn[i].first - (tt ^ cn[i].first), k);
        return 0;
      }
    }
    for (int i = 0; i < cm.size(); i++) {
      int tt = now;
      if ((tt ^ cm[i].first) <= cm[i].first) {
        find(0, cm[i].second, cm[i].first - (tt ^ cm[i].first), k);
        return 0;
      }
    }
    int tt = now;
    if ((tt ^ m) <= m) {
      printf("%d %d %d %d\n", mx, 0, mx, m - (tt ^ m));
    } else
      printf("%d %d %d %d\n", 0, my, n - (tt ^ n), my);
  }
  return 0;
}