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;
template <class T, class U>
bool cmp_second(const pair<T, U> &a, const pair<T, U> &b) {
  return a.second < b.second;
}
pair<int, int> operator+(const pair<int, int> &a, const pair<int, int> &b) {
  return make_pair(a.first + b.first, a.second + b.second);
}
pair<int, int> operator-(const pair<int, int> &a, const pair<int, int> &b) {
  return make_pair(a.first - b.first, a.second - b.second);
}
pair<int, int> &operator+=(pair<int, int> &a, const pair<int, int> &b) {
  a.first += b.first;
  a.second += b.second;
  return a;
}
pair<int, int> &operator-=(pair<int, int> &a, const pair<int, int> &b) {
  a.first -= b.first;
  a.second -= b.second;
  return a;
}
inline int sg(int x) { return x ? (x > 0 ? 1 : -1) : 0; }
class Segment {
 public:
  int r1, r2, c1, c2;
  void input() {
    scanf("%d %d %d %d", &r1, &c1, &r2, &c2);
    if (r1 > r2) swap(r1, r2);
    if (c1 > c2) swap(c1, c2);
  }
};
int rn, cn, k;
vector<Segment> rseg, cseg;
bool cmpr(Segment a, Segment b) {
  if (a.r1 != b.r1) return a.r1 < b.r1;
  return a.c1 < b.c1;
}
bool cmpc(Segment a, Segment b) {
  if (a.c1 != b.c1) return a.c1 < b.c1;
  return a.r1 < b.r1;
}
const int inf = 1000000500;
inline int cut(vector<pair<int, int> > segs, int todo = inf) {
  int rb = 0, ret = 0;
  for (int i = 0; i < segs.size(); i++) {
    int a = max(segs[i].first, rb) - rb;
    if (ret + a >= todo) {
      return rb + (todo - ret);
    }
    ret += a;
    rb = max(rb, segs[i].second);
  }
  return ret;
}
inline int getnim(int ans = -1) {
  int nim = 0;
  vector<int> rseen, cseen;
  for (int i = 0, j = 0; i < rseg.size(); i = j) {
    vector<pair<int, int> > segs;
    for (j = i; j < rseg.size() && rseg[i].r1 == rseg[j].r1; j++)
      segs.push_back(make_pair(rseg[j].c1, rseg[j].c2));
    segs.push_back(make_pair(cn, cn));
    int totl = cut(segs);
    if (ans >= 0 && (totl ^ ans) < totl) {
      int todo = totl - (totl ^ ans);
      int x = cut(segs, todo);
      printf("%d %d %d %d\n", rseg[i].r1, 0, rseg[i].r1, x);
      return -1;
    }
    nim ^= totl;
    rseen.push_back(rseg[i].r1);
  }
  for (int i = 0, j = 0; i < cseg.size(); i = j) {
    vector<pair<int, int> > segs;
    for (j = i; j < cseg.size() && cseg[i].c1 == cseg[j].c1; j++)
      segs.push_back(make_pair(cseg[j].r1, cseg[j].r2));
    segs.push_back(make_pair(rn, rn));
    int totl = cut(segs);
    if (ans >= 0 && (totl ^ ans) < totl) {
      int todo = totl - (totl ^ ans);
      int x = cut(segs, todo);
      printf("%d %d %d %d\n", 0, cseg[i].c1, x, cseg[i].c1);
      return -1;
    }
    nim ^= totl;
    cseen.push_back(cseg[i].c1);
  }
  if ((rn - 1 - rseen.size()) & 1) nim ^= cn;
  if ((cn - 1 - cseen.size()) & 1) nim ^= rn;
  if (ans >= 0 && rseen.size() < rn - 1 && (cn ^ ans) < cn) {
    int todo = cn - (cn ^ ans);
    int z;
    for (z = 1; z <= rseen.size(); z++)
      if (rseen[z - 1] != z) break;
    printf("%d %d %d %d\n", z, 0, z, todo);
    return -1;
  }
  if (ans >= 0 && cseen.size() < cn - 1 && (rn ^ ans) < rn) {
    int todo = rn - (rn ^ ans);
    int z;
    for (z = 1; z <= cseen.size(); z++)
      if (cseen[z - 1] != z) break;
    printf("%d %d %d %d\n", 0, z, todo, z);
    return -1;
  }
  return nim;
}
bool solve() {
  sort(rseg.begin(), rseg.end(), cmpr);
  sort(cseg.begin(), cseg.end(), cmpc);
  int nim = getnim();
  if (!nim) return 0;
  puts("FIRST");
  getnim(nim);
  return 1;
}
int main(void) {
  scanf("%d %d %d", &rn, &cn, &k);
  for (int i = 0; i < k; i++) {
    Segment s;
    s.input();
    if (s.r1 == s.r2)
      rseg.push_back(s);
    else
      cseg.push_back(s);
  }
  if (!solve()) puts("SECOND");
  return 0;
}