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>
inline long long gcd(long long a, long long b) {
  return (b ? gcd(b, a % b) : a);
}
inline long long lcm(long long a, long long b) { return (a / gcd(a, b)) * b; }
inline int cmp(double x, double y = 0, double tol = 1e-7) {
  return (x <= y + tol) ? (x + tol < y) ? -1 : 0 : 1;
}
using namespace std;
map<int, vector<pair<int, int> > > hori;
map<int, vector<pair<int, int> > > vert;
map<int, vector<pair<int, int> > >::iterator it;
vector<pair<int, int> > szH, szV;
int first(vector<pair<int, int> > v, int x, int tot) {
  sort(v.begin(), v.end());
  int ini = 0, fim = 0, sum = 0;
  for (int i = 0; i < (int)v.size(); i++) {
    if (v[i].first > fim) {
      sum += v[i].first - fim;
      ini = v[i].first;
      fim = v[i].second;
      if (sum >= x) {
        return v[i].first - (sum - x);
      }
    } else {
      fim = max(fim, v[i].second);
    }
  }
  sum += tot - fim;
  return tot - (sum - x);
}
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  for (int i = 0, x, x2, y, y2; i < k; i++) {
    cin >> x >> y >> x2 >> y2;
    if (x2 == x) {
      if (y > y2) swap(y, y2);
      hori[x].push_back(make_pair(y, y2));
    }
    if (y2 == y) {
      if (x > x2) swap(x, x2);
      vert[y].push_back(make_pair(x, x2));
    }
  }
  vector<pair<int, int> > v;
  for (it = hori.begin(); it != hori.end(); it++) {
    v = it->second;
    sort(v.begin(), v.end());
    int ini = 0, fim = 0, sum = 0;
    for (int i = 0; i < (int)v.size(); i++) {
      if (v[i].first <= fim) {
        fim = max(fim, v[i].second);
      } else {
        sum += fim - ini;
        ini = v[i].first;
        fim = v[i].second;
      }
    }
    sum += fim - ini;
    szH.push_back(make_pair(m - sum, it->first));
  }
  for (it = vert.begin(); it != vert.end(); it++) {
    v = it->second;
    sort(v.begin(), v.end());
    int ini = 0, fim = 0, sum = 0;
    for (int i = 0; i < (int)v.size(); i++) {
      if (v[i].first <= fim) {
        fim = max(fim, v[i].second);
      } else {
        sum += fim - ini;
        ini = v[i].first;
        fim = v[i].second;
      }
    }
    sum += fim - ini;
    szV.push_back(make_pair(n - sum, it->first));
  }
  long long ans = 0;
  if ((n - 1 - szH.size()) % 2 == 1) ans ^= m;
  if ((m - 1 - szV.size()) % 2 == 1) ans ^= n;
  for (int i = 0; i < (int)szH.size(); i++) ans ^= szH[i].first;
  for (int i = 0; i < (int)szV.size(); i++) ans ^= szV[i].first;
  for (int i = 1; i < n; i++) {
    if (hori[i].size() == 0) {
      szH.push_back(make_pair(m, i));
      break;
    }
  }
  for (int i = 1; i < m; i++) {
    if (vert[i].size() == 0) {
      szV.push_back(make_pair(n, i));
      break;
    }
  }
  if (ans == 0) {
    cout << "SECOND\n";
    return 0;
  }
  for (int i = 0, x; i < (int)szH.size(); i++) {
    x = ans ^ szH[i].first;
    if (x <= szH[i].first) {
      cout << "FIRST\n";
      cout << szH[i].second << " 0 " << szH[i].second << " "
           << first(hori[szH[i].second], szH[i].first - x, m) << endl;
      return 0;
    }
  }
  for (int i = 0, x; i < (int)szV.size(); i++) {
    x = ans ^ szV[i].first;
    if (x <= szV[i].first) {
      cout << "FIRST\n";
      cout << "0 " << szV[i].second << " "
           << first(vert[szV[i].second], szV[i].first - x, n) << " "
           << szV[i].second << endl;
      return 0;
    }
  }
}