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;
map<long long int, long long int> m;
map<long long int, vector<pair<long long int, long long int> > > xcuts;
map<long long int, vector<pair<long long int, long long int> > > ycuts;
map<long long int, long long int> x;
map<long long int, long long int> y;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int a, b, k;
  cin >> a >> b >> k;
  long long int xa, xb, ya, yb;
  for (long long int i = 0; i < k; i++) {
    cin >> xa >> ya >> xb >> yb;
    if (xa == xb)
      xcuts[xa].push_back({min(ya, yb), max(ya, yb)});
    else
      ycuts[ya].push_back({min(xa, xb), max(xa, xb)});
  }
  m[a] += b - 1;
  m[b] += a - 1;
  for (auto j : xcuts) {
    sort(j.second.begin(), j.second.end());
    long long int s = 0, e = 0;
    long long int val = 0;
    for (auto i : j.second) {
      if (i.first > e) {
        val += (e - s);
        s = i.first;
      }
      if (i.second > e) {
        e = i.second;
      }
    }
    val += (e - s);
    m[b]--;
    m[b - val]++;
    x[b - val] = j.first;
  }
  for (auto j : ycuts) {
    sort(j.second.begin(), j.second.end());
    long long int s = 0, e = 0;
    long long int val = 0;
    for (auto i : j.second) {
      if (i.first > e) {
        val += (e - s);
        s = i.first;
      }
      if (i.second > e) {
        e = i.second;
      }
    }
    val += (e - s);
    m[a]--;
    m[a - val]++;
    y[a - val] = j.first;
  }
  for (long long int i = 1; i < min(a, (long long int)100009); i++) {
    if (xcuts[i].size() == 0) {
      x[b] = i;
      break;
    }
  }
  for (long long int i = 1; i < min(b, (long long int)100009); i++) {
    if (ycuts[i].size() == 0) {
      y[a] = i;
      break;
    }
  }
  long long int nim = 0;
  for (auto i : m) {
    if (i.second % 2 == 1) nim ^= i.first;
  }
  if (nim == 0)
    cout << "SECOND";
  else {
    cout << "FIRST" << '\n';
    for (auto i : x) {
      if ((nim ^ i.first) < i.first) {
        long long int z = 0, s = 0, e = 0;
        long long int xc = i.second;
        long long int req = i.first - (nim ^ i.first);
        sort(xcuts[xc].begin(), xcuts[xc].end());
        for (auto j : xcuts[xc]) {
          if (j.first > e) {
            s = j.first;
            if ((z + s - e) >= req) break;
            z += (s - e);
          }
          if (j.second > e) e = j.second;
        }
        cout << xc << ' ' << 0 << ' ' << xc << ' ' << (e + req - z);
        return 0;
      }
    }
    for (auto i : y) {
      if ((nim ^ i.first) < i.first) {
        long long int z = 0, s = 0, e = 0;
        long long int yc = i.second;
        long long int req = i.first - (nim ^ i.first);
        sort(ycuts[yc].begin(), ycuts[yc].end());
        for (auto j : ycuts[yc]) {
          if (j.first > e) {
            s = j.first;
            if ((z + s - e) >= req) break;
            z += (s - e);
          }
          if (j.second > e) e = j.second;
        }
        cout << 0 << ' ' << yc << ' ' << (e + req - z) << ' ' << yc;
        return 0;
      }
    }
  }
}