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;
void normalize(vector<pair<pair<int, int>, int> >& in,
               vector<pair<int, pair<int, int> > >& out) {
  if (in.size() == 0) return;
  sort(in.begin(), in.end());
  pair<int, int> start;
  int c = 0;
  for (int i = 0; i < (in.size()); ++i) {
    if (c == 0) {
      start = in[i].first;
    }
    c += in[i].second;
    if (c == 0) {
      out.push_back(make_pair(
          start.first, pair<int, int>(start.second, in[i].first.second)));
    }
  }
}
int result = 0;
int was[200000];
void go(vector<pair<int, pair<int, int> > >& V, int N, int M) {
  int M2 = min(200000, M);
  for (int i = 0; i < (M2); ++i) was[i] = false;
  int left = N;
  for (int i = 0; i < (V.size()); ++i) {
    if (i > 0 && V[i].first != V[i - 1].first) {
      result ^= left;
      --M;
      left = N;
    }
    left -= V[i].second.second - V[i].second.first;
    if (V[i].first < 200000) was[V[i].first] = true;
  }
  if (V.size()) {
    result ^= left;
    --M;
  }
  if (M > 0) {
    result ^= N * (M & 1);
  }
}
pair<int, pair<int, int> > get(vector<pair<int, pair<int, int> > >& V, int cnt,
                               int row) {
  vector<pair<int, int> > tmp;
  for (int i = 0; i < (V.size()); ++i)
    if (V[i].first == row) tmp.push_back(V[i].second);
  tmp.push_back(pair<int, int>(1000000010, 1000000020));
  int A = cnt, B = 0;
  for (int i = 0; i < (tmp.size()); ++i) {
    if (B + A <= tmp[i].first)
      return make_pair(row, pair<int, int>(0, B + A));
    else {
      A -= (tmp[i].first - B);
      B = tmp[i].second;
    }
  }
  throw ":/";
  return make_pair(0, pair<int, int>(0, 0));
}
pair<int, pair<int, int> > get2(vector<pair<int, pair<int, int> > >& V, int N,
                                int M, int cnt) {
  int K = 1 << 30;
  while (!(K & cnt)) K >>= 1;
  int M2 = min(200000, M);
  for (int i = 0; i < (M2); ++i) was[i] = false;
  int left = N;
  for (int i = 0; i < (V.size()); ++i) {
    if (i > 0 && V[i].first != V[i - 1].first) {
      if (left & K) return get(V, left - (cnt ^ left), V[i - 1].first);
      --M;
      left = N;
    }
    left -= V[i].second.second - V[i].second.first;
    if (V[i].first < 200000) was[V[i].first] = true;
  }
  if (V.size()) {
    --M;
    if (left & K) return get(V, left - (cnt ^ left), V[V.size() - 1].first);
  }
  if (M > 0) {
    if (N & K) {
      for (int i = 0; i < (M2); ++i)
        if (!was[i]) return get(V, N - (cnt ^ N), i);
    }
  }
  return make_pair(-1, pair<int, int>(-1, -1));
}
vector<pair<pair<int, int>, int> > H, V;
vector<pair<int, pair<int, int> > > H2, V2;
int main() {
  int N, M, K;
  scanf("%d%d%d", &N, &M, &K);
  for (int i = 0; i < (K); ++i) {
    int x1, y1, x2, y2;
    scanf("%d%d%d%d", &x1, &y1, &x2, &y2);
    if (y2 < y1) swap(y1, y2);
    if (x2 < x1) swap(x1, x2);
    if (x1 == x2) {
      V.push_back(make_pair(pair<int, int>(x1 - 1, y1), -1));
      V.push_back(make_pair(pair<int, int>(x2 - 1, y2), 1));
    } else {
      H.push_back(make_pair(pair<int, int>(y1 - 1, x1), -1));
      H.push_back(make_pair(pair<int, int>(y2 - 1, x2), 1));
    }
  }
  normalize(H, H2);
  normalize(V, V2);
  result = 0;
  go(H2, N, M - 1);
  go(V2, M, N - 1);
  if (result == 0) {
    printf("SECOND\n");
  } else {
    printf("FIRST\n");
    pair<int, pair<int, int> > res = get2(H2, N, M - 1, result);
    if (res.first >= 0) {
      printf("%d %d %d %d\n", res.second.first, res.first + 1,
             res.second.second, res.first + 1);
    } else {
      res = get2(V2, M, N - 1, result);
      printf("%d %d %d %d\n", res.first + 1, res.second.first, res.first + 1,
             res.second.second);
    }
  }
}