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;
long long sqr(long long x) { return x * x; }
template <class T>
void checkmax(T &t, T x) {
  if (x > t) t = x;
}
template <class T>
void checkmin(T &t, T x) {
  if (x < t) t = x;
}
template <class T>
void _checkmax(T &t, T x) {
  if (t == -1 || x > t) t = x;
}
template <class T>
void _checkmin(T &t, T x) {
  if (t == -1 || x < t) t = x;
}
long long power_mod(long long a, int b, int p) {
  long long ret = 1;
  for (; b; b >>= 1) {
    if (b & 1) ret = ret * a % p;
    a = a * a % p;
  }
  return ret;
}
pair<int, int> getPair(vector<pair<int, int> > vec, int need) {
  vector<pair<int, int> > v;
  int r = -1;
  for (__typeof((vec).begin()) it = (vec).begin(); it != (vec).end(); it++) {
    if (it->first > r)
      v.push_back(*it);
    else {
      checkmax(v[v.size() - 1].second, it->second);
    }
    r = v[v.size() - 1].second;
  }
  r = 0;
  for (size_t i = 0; i < v.size(); i++) {
    if (v[i].first - r >= need) {
      return make_pair(0, r + need);
    }
    need -= v[i].first - r;
    r = v[i].second;
  }
  return make_pair(0, r + need);
}
int m, n, c;
map<int, vector<pair<int, int> > > h;
map<int, int> value_h;
map<int, vector<pair<int, int> > > v;
map<int, int> value_v;
int main() {
  scanf("%d%d%d", &m, &n, &c);
  for (int i = 0; i < (int)(c); i++) {
    int a, b, c, d;
    scanf("%d%d%d%d", &a, &b, &c, &d);
    if (a == c && b == d) continue;
    if (a == c) {
      h[a].push_back(make_pair(min(b, d), max(b, d)));
    } else if (b == d) {
      v[b].push_back(make_pair(min(a, c), max(a, c)));
    }
  }
  int ans = 0;
  for (__typeof((h).begin()) it = (h).begin(); it != (h).end(); it++) {
    vector<pair<int, int> > &vec = it->second;
    sort(vec.begin(), vec.end());
    int r = -1;
    int now = 0;
    for (__typeof((vec).begin()) i = (vec).begin(); i != (vec).end(); i++) {
      if (i->first > r) {
        now += i->second - i->first;
      } else if (i->second > r) {
        now += i->second - r;
      }
      r = max(i->second, r);
    }
    now = n - now;
    ans ^= now;
    value_h[it->first] = now;
  }
  for (__typeof((v).begin()) it = (v).begin(); it != (v).end(); it++) {
    vector<pair<int, int> > &vec = it->second;
    sort(vec.begin(), vec.end());
    int r = -1;
    int now = 0;
    for (__typeof((vec).begin()) i = (vec).begin(); i != (vec).end(); i++) {
      if (i->first > r) {
        now += i->second - i->first;
      } else if (i->second > r) {
        now += i->second - r;
      }
      r = max(i->second, r);
    }
    now = m - now;
    ans ^= now;
    value_v[it->first] = now;
  }
  if (h.size() < m - 1) {
    if ((m - 1 - h.size()) & 1) ans ^= n;
    for (int i = 1; i < m; i++)
      if (!h.count(i)) {
        value_h[i] = n;
        h[i].clear();
        break;
      }
  }
  if (v.size() < n - 1) {
    if ((n - 1 - v.size()) & 1) ans ^= m;
    for (int i = 1; i < n; i++)
      if (!v.count(i)) {
        value_v[i] = m;
        v[i].clear();
        break;
      }
  }
  if (!ans) {
    puts("SECOND");
  } else {
    puts("FIRST");
    pair<int, int> res;
    for (__typeof((value_h).begin()) it = (value_h).begin();
         it != (value_h).end(); it++) {
      int i = it->second;
      if ((i ^ ans) < i) {
        res = getPair(h[it->first], i - (i ^ ans));
        printf("%d %d %d %d\n", it->first, res.first, it->first, res.second);
        return 0;
      }
    }
    for (__typeof((value_v).begin()) it = (value_v).begin();
         it != (value_v).end(); it++) {
      int i = it->second;
      if ((i ^ ans) < i) {
        res = getPair(v[it->first], i - (i ^ ans));
        printf("%d %d %d %d\n", res.first, it->first, res.second, it->first);
        return 0;
      }
    }
    while (1)
      ;
  }
  return 0;
}