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 dx[] = {0, 0, 1, -1};
int dy[] = {1, -1, 0, 0};
template <class T>
inline void smin(T &a, T b) {
  if (a > b) a = b;
}
template <class T>
inline void smax(T &a, T b) {
  if (a < b) a = b;
}
map<int, int> mpx, mpy;
vector<pair<int, int> > px[311111], py[311111];
pair<int, int> canx[311111], cany[311111];
int xx[311111], yy[311111], nx, ny;
int get_idx(int first) {
  if (mpx.count(first)) return mpx[first];
  xx[nx] = first;
  return mpx[first] = nx++;
}
int get_idy(int second) {
  if (mpy.count(second)) return mpy[second];
  yy[ny] = second;
  return mpy[second] = ny++;
}
int main() {
  int N, M, K, i, deg, stx, sty, edx, edy, la;
  int u, v, pre, j, k, st, ed, cnt, cx = 0, cy = 0;
  scanf("%d%d%d", &N, &M, &K);
  for (i = 0; i < K; i++) {
    scanf("%d%d%d%d", &stx, &sty, &edx, &edy);
    if (stx > edx) swap(stx, edx);
    if (sty > edy) swap(sty, edy);
    if (stx == edx) {
      u = get_idx(stx);
      px[u].push_back(pair<int, int>(sty, edy));
    } else {
      v = get_idy(sty);
      py[v].push_back(pair<int, int>(stx, edx));
    }
  }
  int res = 0;
  for (i = 0; i < nx; i++) {
    sort(px[i].begin(), px[i].end());
    deg = px[i].size();
    int s = 0;
    for (j = 0; j < deg; j = k) {
      st = px[i][j].first;
      ed = px[i][j].second;
      for (k = j + 1; k < deg; k++) {
        if (px[i][k].first > ed) break;
        smax(ed, px[i][k].second);
      }
      s += (ed - st);
    }
    if (M - s) {
      res ^= (M - s);
      canx[cx++] = pair<int, int>(i, M - s);
    }
  }
  for (i = 0; i < ny; i++) {
    sort(py[i].begin(), py[i].end());
    deg = py[i].size();
    int s = 0;
    for (j = 0; j < deg; j = k) {
      st = py[i][j].first;
      ed = py[i][j].second;
      for (k = j + 1; k < deg; k++) {
        if (py[i][k].first > ed) break;
        smax(ed, py[i][k].second);
      }
      s += (ed - st);
    }
    if (N - s) {
      res ^= (N - s);
      cany[cy++] = pair<int, int>(i, N - s);
    }
  }
  if ((N - 1 - nx) % 2) res ^= M;
  if ((M - 1 - ny) % 2) res ^= N;
  for (i = 1; i < N; i++) {
    if (!mpx.count(i)) break;
  }
  if (i < N) {
    u = get_idx(i);
    canx[cx++] = pair<int, int>(u, M);
    px[u].push_back(pair<int, int>(0, 0));
  }
  for (i = 1; i < M; i++) {
    if (!mpy.count(i)) break;
  }
  if (i < M) {
    u = get_idy(i);
    cany[cy++] = pair<int, int>(u, N);
    py[u].push_back(pair<int, int>(0, 0));
  }
  if (res) {
    puts("FIRST");
    for (i = 0; i < cx; i++) {
      u = canx[i].first;
      if ((res ^ canx[i].second) < canx[i].second) {
        cnt = canx[i].second - (res ^ canx[i].second);
        deg = px[u].size();
        int s = 0, pre = 0;
        la = -1;
        for (j = 0; j < deg; j = k) {
          st = px[u][j].first;
          ed = px[u][j].second;
          for (k = j + 1; k < deg; k++) {
            if (px[u][k].first > ed) break;
            smax(ed, px[u][k].second);
          }
          s += (st - pre);
          if (s >= cnt) {
            la = st - (s - cnt);
            break;
          }
          pre = ed;
        }
        if (la == -1) {
          s += (M - pre);
          la = M - (s - cnt);
        }
        printf("%d %d %d %d\n", xx[u], 0, xx[u], la);
        return 0;
      }
    }
    for (i = 0; i < cy; i++) {
      u = cany[i].first;
      if ((res ^ cany[i].second) < cany[i].second) {
        cnt = cany[i].second - (res ^ cany[i].second);
        deg = py[u].size();
        int s = 0, pre = 0;
        la = -1;
        for (j = 0; j < deg; j = k) {
          st = py[u][j].first;
          ed = py[u][j].second;
          for (k = j + 1; k < deg; k++) {
            if (py[u][k].first > ed) break;
            smax(ed, py[u][k].second);
          }
          s += (st - pre);
          if (s >= cnt) {
            la = st - (s - cnt);
            break;
          }
          pre = ed;
        }
        if (la == -1) {
          s += (N - pre);
          la = N - (s - cnt);
        }
        printf("%d %d %d %d\n", 0, yy[u], la, yy[u]);
        return 0;
      }
    }
  } else
    puts("SECOND");
  return 0;
}