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 n[2], k;
vector<pair<int, pair<int, int> > > t[2];
vector<pair<int, int> > v[2];
int main() {
  ios::sync_with_stdio(false);
  cin >> n[0] >> n[1] >> k;
  while (k--) {
    int x1, y1, x2, y2;
    cin >> x1 >> y1 >> x2 >> y2;
    if (x1 > x2) swap(x1, x2);
    if (y1 > y2) swap(y1, y2);
    if (x1 == x2)
      t[0].push_back(make_pair(x1, make_pair(y1, y2)));
    else
      t[1].push_back(make_pair(y1, make_pair(x1, x2)));
  }
  int xorall = 0;
  for (int z = 0, _n = (int)(2); z < _n; z++) {
    sort((t[z]).begin(), (t[z]).end());
    int last = 0;
    int emp = (int((t[z]).size()))
                  ? (t[z][(int((t[z]).size())) - 1].first + 1 < n[z]
                         ? t[z][(int((t[z]).size())) - 1].first + 1
                         : 0)
                  : n[z] - 1;
    for (int i = 0, _n = (int)((int((t[z]).size()))); i < _n; i++) {
      if (i == 0 || t[z][i].first != t[z][i - 1].first) {
        v[z].push_back(make_pair(t[z][i].first, 0)), last = 0;
        if ((i && t[z][i].first - 1 > t[z][i - 1].first) ||
            (i == 0 && t[z][i].first > 1))
          emp = t[z][i].first - 1;
      }
      v[z].back().second +=
          max(0, t[z][i].second.second - max(t[z][i].second.first, last)),
          last = max(last, t[z][i].second.second);
      ;
    }
    if (emp != 0) v[z].push_back(make_pair(emp, 0));
    for (int i = 0, _n = (int)((int((v[z]).size()))); i < _n; i++)
      xorall ^= n[1 - z] - v[z][i].second;
    xorall ^= n[1 - z] * ((n[z] - 1 - (int((v[z]).size()))) % 2);
  }
  cerr << xorall << endl;
  if (xorall == 0) {
    cout << "SECOND" << endl;
    return 0;
  }
  cout << "FIRST" << endl;
  int maxbit = 1;
  while (xorall / 2 >= maxbit) maxbit <<= 1;
  for (int z = 0, _n = (int)(2); z < _n; z++)
    for (int i = 0, _n = (int)((int((v[z]).size()))); i < _n; i++)
      if ((n[1 - z] - v[z][i].second) & maxbit) {
        int target = ((n[1 - z] - v[z][i].second) ^ xorall);
        int k1 = lower_bound((t[z]).begin(), (t[z]).end(),
                             make_pair(v[z][i].first, make_pair(0, 0))) -
                 t[z].begin();
        int k2 = lower_bound((t[z]).begin(), (t[z]).end(),
                             make_pair(v[z][i].first, make_pair(1 << 30, 0))) -
                 t[z].begin();
        int last = 0;
        for (int k = (int)(k1), _n = (int)(k2); k < _n; k++) {
          if (t[z][k].second.first >= last + target) break;
          target -= max(0, t[z][k].second.first - last);
          last = max(last, t[z][k].second.second);
        }
        last += target;
        if (z == 0)
          cout << v[z][i].first << ' ' << last << ' ' << v[z][i].first << ' '
               << n[1 - z] << endl;
        else
          cout << last << ' ' << v[z][i].first << ' ' << n[1 - z] << ' '
               << v[z][i].first << endl;
        z = 1;
        break;
      }
  {
    int _;
    cin >> _;
    return 0;
  }
}