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;
struct nameX {
  long long x;
  long long y;
};
bool operator<(nameX A, nameX B) { return A.x < B.x; };
struct nameY {
  long long X;
  long long Y;
};
bool operator<(nameY A, nameY B) { return A.X < B.X; };
map<long long, long long> fx;
map<long long, long long> fy;
map<long long, long long> fxx;
map<long long, long long> fyy;
long long Mx[200000], My[200000];
vector<nameX> mx[200000];
vector<nameY> my[200000];
long long n, m, k, a1, a2, a3, a4;
nameX nww;
nameY noW;
long long reto, now;
long long i, lx, ly;
long long lp, j;
long long kkx, kky;
long long nooowy, nooowx;
long long noindx, noindy;
long long mlpo, last;
int main() {
  cin >> n >> m >> k;
  kkx = 1;
  kky = 1;
  for (i = 1; i <= k; i++) {
    cin >> a1 >> a2 >> a3 >> a4;
    if (a1 > a3) swap(a1, a3);
    if (a2 > a4) swap(a2, a4);
    if (a1 == a3) {
      if (fx[a1] == 0) {
        lx++;
        fx[a1] = lx;
        fxx[lx] = a1;
      }
      {
        nww.x = a2;
        nww.y = a4;
        mx[fx[a1]].push_back(nww);
      }
    }
    if (a2 == a4) {
      if (fy[a2] == 0) {
        ly++;
        fy[a2] = ly;
        fyy[ly] = a2;
      }
      {
        noW.X = a1;
        noW.Y = a3;
        my[fy[a2]].push_back(noW);
      }
    }
  }
  while (fx[kkx] != 0) kkx++;
  while (fy[kky] != 0) kky++;
  for (i = 1; i <= lx; i++) {
    sort(mx[i].begin(), mx[i].end());
    now = mx[i][0].y - mx[i][0].x;
    reto = mx[i][0].y;
    for (j = 0; j < mx[i].size(); j++) {
      if (reto >= mx[i][j].y) continue;
      if (reto >= mx[i][j].x)
        now += mx[i][j].y - reto;
      else
        now += mx[i][j].y - mx[i][j].x;
      reto = mx[i][j].y;
    }
    Mx[i] = m - now;
  }
  for (i = 1; i <= ly; i++) {
    sort(my[i].begin(), my[i].end());
    now = my[i][0].Y - my[i][0].X;
    reto = my[i][0].Y;
    for (j = 0; j < my[i].size(); j++) {
      if (reto >= my[i][j].Y) continue;
      if (reto >= my[i][j].X)
        now += my[i][j].Y - reto;
      else
        now += my[i][j].Y - my[i][j].X;
      reto = my[i][j].Y;
    }
    My[i] = n - now;
  }
  lp = (((n - 1) - lx) % 2) * m;
  lp = lp ^ ((((m - 1) - ly) % 2) * n);
  for (i = 1; i <= lx; i++) lp = lp ^ (Mx[i]);
  for (i = 1; i <= ly; i++) lp = lp ^ (My[i]);
  if (lp == 0) {
    cout << "SECOND" << endl;
    return 0;
  }
  if (kkx < n) {
    lx++;
    Mx[lx] = m;
    fx[kkx] = lx;
    fxx[lx] = kkx;
  }
  if (kky < m) {
    ly++;
    My[ly] = n;
    fy[kky] = ly;
    fyy[ly] = kky;
  }
  nooowx = -1;
  noindx = 0;
  for (i = 1; i <= lx; i++)
    if (Mx[i] > nooowx) {
      nooowx = Mx[i];
      noindx = i;
    }
  nooowy = -1;
  noindy = 0;
  for (i = 1; i <= ly; i++)
    if (My[i] > nooowy) {
      nooowy = My[i];
      noindy = i;
    }
  for (j = 1; j <= lx; j++) {
    nooowx = Mx[j];
    noindx = j;
    mlpo = nooowx - (nooowx ^ lp);
    if (mlpo <= 0 || mlpo > nooowx) continue;
    nww.x = m;
    nww.y = m + 1;
    mx[noindx].push_back(nww);
    last = 0;
    for (i = 0; i < mx[noindx].size(); i++) {
      if (last >= mx[noindx][i].x) {
        last = mx[noindx][i].y;
        continue;
      }
      if (last + mlpo <= mx[noindx][i].x) {
        cout << "FIRST" << endl;
        cout << fxx[noindx] << " 0 " << fxx[noindx] << " " << last + mlpo
             << endl;
        return 0;
      }
      mlpo -= mx[noindx][i].x - last;
      last = mx[noindx][i].y;
    }
  }
  for (j = 1; j <= ly; j++) {
    nooowy = My[j];
    noindy = j;
    mlpo = nooowy - (nooowy ^ lp);
    if (mlpo <= 0 || mlpo > nooowy) continue;
    noW.X = n;
    noW.Y = n + 1;
    my[noindy].push_back(noW);
    last = 0;
    for (i = 0; i < my[noindy].size(); i++) {
      if (last >= my[noindy][i].X) {
        last = my[noindy][i].Y;
        continue;
      }
      if (last + mlpo <= my[noindy][i].X) {
        cout << "FIRST" << endl;
        cout << 0 << " " << fyy[noindy] << " " << last + mlpo << " "
             << fyy[noindy] << endl;
        return 0;
      }
      mlpo -= my[noindy][i].X - last;
      last = my[noindy][i].Y;
    }
  }
}