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>
const double eps = 1e-9;
const double pi = acos(-1);
const int oo = 1000000000;
const int mod = 1000000007;
const double E = 2.7182818284590452353602874713527;
using namespace std;
struct case1 {
  vector<pair<int, bool> > a;
  int pos, len;
} p[200005];
map<int, int> h;
int calc(int x, int l) {
  int last = 0, s = 0, ans = 0;
  for (int i = 0; i < p[x].a.size(); i++) {
    int t = min(l, p[x].a[i].first);
    if (!s) ans += t - last;
    last = t;
    if (p[x].a[i].second)
      s++;
    else
      s--;
  }
  if (!s) ans += l - last;
  return ans;
}
int main() {
  int n, m, k, o = 0, s1 = 0, s2 = 0, sg = 0;
  cin >> n >> m >> k;
  s1 = n - 1;
  s2 = m - 1;
  for (int i = 1; i <= k; i++) {
    int a, b, c, d;
    scanf("%d%d%d%d", &a, &b, &c, &d);
    if (a == c) {
      if (!h[a]) {
        h[a] = ++o;
        p[o].pos = a;
        s1--;
      }
      int pos = h[a];
      p[pos].a.push_back(make_pair(min(b, d), 1));
      p[pos].a.push_back(make_pair(max(b, d), 0));
    } else {
      if (!h[b + n]) {
        h[b + n] = ++o;
        p[o].pos = b + n;
        s2--;
      }
      int pos = h[b + n];
      p[pos].a.push_back(make_pair(min(a, c), 1));
      p[pos].a.push_back(make_pair(max(a, c), 0));
    }
  }
  for (int i = 1; i <= o; i++) sort(p[i].a.begin(), p[i].a.end());
  if (s1 & 1) sg ^= m;
  if (s2 & 1) sg ^= n;
  for (int i = 1; i < n; i++)
    if (!h[i]) {
      p[++o].pos = i;
      p[o].len = m;
      break;
    }
  for (int i = 1; i < m; i++)
    if (!h[i + n]) {
      p[++o].pos = i + n;
      p[o].len = n;
      break;
    }
  for (int i = 1; i <= o; i++)
    if (p[i].a.size() > 0) {
      if (p[i].pos <= n)
        sg ^= (p[i].len = calc(i, m));
      else
        sg ^= (p[i].len = calc(i, n));
    }
  if (sg) {
    cout << "FIRST" << endl;
    for (int i = 1; i <= o; i++)
      if ((sg ^ p[i].len) < p[i].len) {
        int t = (sg ^ p[i].len), l = -1, r;
        if (p[i].pos <= n)
          r = m;
        else
          r = n;
        while (l < r - 1) {
          int mid = (l + r) >> 1;
          if (calc(i, mid) >= t)
            r = mid;
          else
            l = mid;
        }
        if (p[i].pos <= n)
          cout << p[i].pos << ' ' << r << ' ' << p[i].pos << ' ' << m;
        else
          cout << r << ' ' << p[i].pos - n << ' ' << n << ' ' << p[i].pos - n;
        break;
      }
  } else
    cout << "SECOND" << endl;
  return 0;
}