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;
map<int, int> mpX, _mpX, mpY, _mpY;
vector<pair<int, int> > lineX[100010], lineY[100010];
int a = 0, b = 0;
int getLeft(vector<pair<int, int> > vec, int n) {
  int ed = 0;
  for (int i = 0; i < vec.size(); i++)
    if (vec[i].second > ed) {
      n -= (vec[i].second - max(vec[i].first, ed));
      ed = vec[i].second;
    }
  return n;
}
int getOR() {
  int ans = 0;
  if ((n - 1 - a) % 2 != 0) ans ^= m;
  if ((m - 1 - b) % 2 != 0) ans ^= n;
  for (int i = 1; i <= a; i++) ans ^= getLeft(lineX[i], m);
  for (int i = 1; i <= b; i++) ans ^= getLeft(lineY[i], n);
  return ans;
}
int maxBit(int u) {
  int ans = 0, ccount = 0;
  while (u) {
    if (u & 1) ans = ccount;
    ccount++;
    u = (u >> 1);
  }
  return ans;
}
int getCut(int OR, int n) { return n - (OR ^ n); }
bool cmp(pair<int, int> A, pair<int, int> B) {
  if (A.first == B.first) return A.second < B.second;
  return A.first < B.first;
}
int getLocation(vector<pair<int, int> > vec, int n) {
  int ed = 0, ccount = 0;
  for (int i = 0; i < vec.size(); i++)
    if (vec[i].second > ed) {
      if (vec[i].first > ed) {
        if (ccount + vec[i].first - ed >= n)
          return ed + n - ccount;
        else
          ccount += vec[i].first - ed, ed = vec[i].second;
      } else {
        ed = vec[i].second;
      }
    }
  return ed + n - ccount;
}
int main() {
  while (scanf("%d %d %d", &n, &m, &k) != EOF) {
    mpX.clear(), _mpX.clear(), mpY.clear(), _mpY.clear();
    while (k--) {
      int x1, y1, x2, y2;
      scanf("%d %d %d %d", &x1, &y1, &x2, &y2);
      if (x1 == x2) {
        if (x1 == 0 || x1 == n) continue;
        if (mpX.find(x1) == mpX.end()) {
          mpX[x1] = ++a;
          _mpX[a] = x1;
        }
        lineX[mpX[x1]].push_back(make_pair(min(y1, y2), max(y1, y2)));
      } else {
        if (y1 == 0 || y1 == m) continue;
        if (mpY.find(y1) == mpY.end()) {
          mpY[y1] = ++b;
          _mpY[b] = y1;
        }
        lineY[mpY[y1]].push_back(make_pair(min(x1, x2), max(x1, x2)));
      }
    }
    for (int i = 1; i <= a; i++) sort(lineX[i].begin(), lineX[i].end(), cmp);
    for (int i = 1; i <= b; i++) sort(lineY[i].begin(), lineY[i].end(), cmp);
    int OR = getOR();
    if (OR == 0)
      printf("SECOND\n");
    else {
      printf("FIRST\n");
      int k = maxBit(OR), cut, u = 1;
      if ((n - 1 > a) && (m & (1 << k))) {
        cut = getCut(OR, m);
        for (int i = 1;; i++) {
          if (mpX.find(i) == mpX.end()) {
            u = i;
            break;
          }
        }
        printf("%d %d %d %d\n", u, 0, u, cut);
      } else if ((m - 1) > b && (n & (1 << k))) {
        cut = getCut(OR, n);
        for (int i = 1;; i++) {
          if (mpY.find(i) == mpY.end()) {
            u = i;
            break;
          }
        }
        printf("%d %d %d %d", 0, u, cut, u);
      } else {
        for (int i = 1; i <= a; i++)
          if (getLeft(lineX[i], m) & (1 << k)) {
            cut = getCut(OR, getLeft(lineX[i], m));
            printf("%d %d %d %d\n", _mpX[i], 0, _mpX[i],
                   getLocation(lineX[i], cut));
            goto ed;
          }
        for (int i = 1; i <= b; i++)
          if (getLeft(lineY[i], n) & (1 << k)) {
            cut = getCut(OR, getLeft(lineY[i], n));
            printf("%d %d %d %d\n", 0, _mpY[i], getLocation(lineY[i], cut),
                   _mpY[i]);
            goto ed;
          }
      }
    ed:;
    }
  }
  return 0;
}