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;
int n, m, k;
unordered_map<int, vector<int>> vcut, hcut;
unordered_map<int, int> vrem, hrem;
bool cmp(int x, int y) {
  int ax = abs(x), ay = abs(y);
  return ax < ay || (ax == ay && x < y);
}
int remaining(vector<int> &a, int last) {
  int cur = 0, cnt = 0, ret = 0;
  for (int x : a) {
    int nxt = abs(x);
    if (cnt == 0) ret += nxt - cur;
    if (x < 0)
      cnt--;
    else
      cnt++;
    cur = nxt;
  }
  ret += last - cur;
  return ret;
}
int find_cut(vector<int> &a, int target, int last) {
  int lo = 0, hi = last - 1;
  a.push_back(-last);
  while (true) {
    int mid = (lo + hi) / 2;
    auto it = lower_bound(a.begin(), a.end(), mid, cmp);
    it = a.insert(it, mid);
    int rem = remaining(a, last);
    a.erase(it);
    if (rem == target) {
      a.pop_back();
      return mid;
    } else if (rem < target)
      lo = mid + 1;
    else
      hi = mid - 1;
  }
}
int main() {
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 0; i < k; i++) {
    int xb, yb, xe, ye;
    scanf("%d%d%d%d", &xb, &yb, &xe, &ye);
    if (xb == xe) {
      hcut[xb].push_back(min(yb, ye));
      hcut[xb].push_back(-max(yb, ye));
    } else {
      vcut[yb].push_back(min(xb, xe));
      vcut[yb].push_back(-max(xb, xe));
    }
  }
  int grundy = 0;
  if ((n - 1 - hcut.size()) % 2 == 1) grundy ^= m;
  if ((m - 1 - vcut.size()) % 2 == 1) grundy ^= n;
  for (auto &p : hcut) {
    sort(p.second.begin(), p.second.end(), cmp);
    hrem[p.first] = remaining(p.second, m);
    grundy ^= hrem[p.first];
  }
  for (auto &p : vcut) {
    sort(p.second.begin(), p.second.end(), cmp);
    vrem[p.first] = remaining(p.second, n);
    grundy ^= vrem[p.first];
  }
  if (grundy == 0) {
    printf("SECOND\n");
    return 0;
  }
  printf("FIRST\n");
  if ((grundy ^ m) < m)
    for (int i = 1; i < n; i++)
      if (!hcut.count(i)) {
        printf("%d %d %d %d\n", i, grundy ^ m, i, m);
        return 0;
      }
  if ((grundy ^ n) < n)
    for (int i = 1; i < m; i++)
      if (!vcut.count(i)) {
        printf("%d %d %d %d\n", grundy ^ n, i, n, i);
        return 0;
      }
  for (auto &p : hcut) {
    int target = grundy ^ hrem[p.first];
    if (target < hrem[p.first]) {
      printf("%d %d %d %d\n", p.first, find_cut(p.second, target, m), p.first,
             m);
      return 0;
    }
  }
  for (auto &p : vcut) {
    int target = grundy ^ vrem[p.first];
    if (target < vrem[p.first]) {
      printf("%d %d %d %d\n", find_cut(p.second, target, n), p.first, n,
             p.first);
      return 0;
    }
  }
}