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;
vector<pair<int, int> > v[100000], h[100000];
int fv[100000], fh[100000], ov[100000], oh[100000];
map<int, int> idv, idh;
int count(vector<pair<int, int> > &p) {
  int i, last = 0, ans = 0;
  for (i = 0; i < p.size(); i++)
    if (p[i].second > last) {
      ans += p[i].second - max(last, p[i].first);
      last = p[i].second;
    }
  return ans;
}
int search(vector<pair<int, int> > &p, int key) {
  int i, last = 0, val = 0;
  for (i = 0; i < p.size(); i++) {
    if (p[i].first > last) {
      val += p[i].first - last;
      if (val >= key) return p[i].first - (val - key);
    }
    last = max(last, p[i].second);
  }
  return last + (key - val);
}
int main() {
  int n, m, k, i, x, y, X, Y, H = 0, V = 0, ans = 0;
  cin >> n >> m >> k;
  for (i = 0; i < k; i++) {
    cin >> x >> y >> X >> Y;
    if (x == X) {
      if (!idv.count(x)) {
        ov[V] = x;
        idv[x] = V++;
      }
      if (y > Y) swap(y, Y);
      v[idv[x]].push_back(pair<int, int>(y, Y));
    }
    if (y == Y) {
      if (!idh.count(y)) {
        oh[H] = y;
        idh[y] = H++;
      }
      if (x > X) swap(x, X);
      h[idh[y]].push_back(pair<int, int>(x, X));
    }
  }
  for (i = 0; i < V; i++) sort(v[i].begin(), v[i].end());
  for (i = 0; i < H; i++) sort(h[i].begin(), h[i].end());
  if ((m - 1 - H) % 2) ans ^= n;
  if ((n - 1 - V) % 2) ans ^= m;
  for (i = 0; i < V; i++) {
    fv[i] = m - count(v[i]);
    ans ^= fv[i];
  }
  for (i = 0; i < H; i++) {
    fh[i] = n - count(h[i]);
    ans ^= fh[i];
  }
  if (ans == 0)
    cout << "SECOND" << endl;
  else {
    cout << "FIRST" << endl;
    if ((ans ^ m) < m) {
      for (i = 1; i < n; i++)
        if (!idv.count(i)) break;
      if (i != n) {
        printf("%d %d %d %d\n", i, 0, i, m - (ans ^ m));
        return 0;
      }
    }
    if ((ans ^ n) < n) {
      for (i = 1; i < m; i++)
        if (!idh.count(i)) break;
      if (i != m) {
        printf("%d %d %d %d\n", 0, i, n - (ans ^ n), i);
        return 0;
      }
    }
    for (i = 0; i < V; i++)
      if ((ans ^ fv[i]) < fv[i]) break;
    if (i != V) {
      printf("%d %d %d %d\n", ov[i], 0, ov[i],
             search(v[i], fv[i] - (ans ^ fv[i])));
      return 0;
    }
    for (i = 0; i < H; i++)
      if ((ans ^ fh[i]) < fh[i]) break;
    if (i != H) {
      printf("%d %d %d %d\n", 0, oh[i], search(h[i], fh[i] - (ans ^ fh[i])),
             oh[i]);
      return 0;
    }
  }
  return 0;
}