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, m, k;
map<int, vector<pair<int, int> > > vert;
map<int, vector<pair<int, int> > > hor;
vector<pair<int, int> > vs;
vector<pair<int, int> > hs;
int getSize(vector<pair<int, int> >& x) {
  int ant = 0;
  int res = 0;
  for (int i = 0; i < ((int)x.size()); i++) {
    int a = max(x[i].first, ant);
    if (a < x[i].second) {
      res += x[i].second - a;
      ant = x[i].second;
    }
  }
  return res;
}
void cortev(int ind, int tam) {
  int x = ind;
  int yb = 0;
  int ye = 0;
  int res = 0;
  vector<pair<int, int> > vec = vert[ind];
  vec.push_back(make_pair(m, m));
  sort(vec.begin(), vec.end());
  for (int i = 0; i < ((int)vec.size()); i++) {
    int a = vec[i].first;
    if (a >= ye) {
      if (res + a - ye >= tam) {
        ye += tam - res;
        break;
      }
      res += a - ye;
    }
    ye = max(ye, vec[i].second);
  }
  printf("%d %d %d %d\n", x, yb, x, ye);
}
void corteh(int ind, int tam) {
  int y = ind;
  int xb = 0;
  int xe = 0;
  int res = 0;
  vector<pair<int, int> > vec = hor[ind];
  vec.push_back(make_pair(n, n));
  sort(vec.begin(), vec.end());
  for (int i = 0; i < ((int)vec.size()); i++) {
    int a = vec[i].first;
    if (a >= xe) {
      if (res + a - xe >= tam) {
        xe += tam - res;
        break;
      }
      res += a - xe;
    }
    xe = max(xe, vec[i].second);
  }
  printf("%d %d %d %d\n", xb, y, xe, y);
}
void findv(int tam) {
  map<int, vector<pair<int, int> > >::iterator it;
  int ant = 1;
  for (it = vert.begin(); it != vert.end(); it++) {
    if (it->first > ant) {
      printf("%d %d %d %d\n", ant, 0, ant, tam);
      return;
    } else {
      ant++;
    }
  }
  printf("%d %d %d %d\n", ant, 0, ant, tam);
}
void findh(int tam) {
  map<int, vector<pair<int, int> > >::iterator it;
  int ant = 1;
  for (it = hor.begin(); it != hor.end(); it++) {
    if (it->first > ant) {
      printf("%d %d %d %d\n", 0, ant, tam, ant);
      return;
    } else {
      ant++;
    }
  }
  printf("%d %d %d %d\n", 0, ant, tam, ant);
}
int main() {
  scanf("%d %d %d", &n, &m, &k);
  vs.clear();
  hs.clear();
  vert.clear();
  hor.clear();
  for (int i = 0; i < (k); i++) {
    int xb, yb, xe, ye;
    scanf("%d %d %d %d", &xb, &yb, &xe, &ye);
    if (xb == xe) {
      vert[xb].push_back(make_pair(min(yb, ye), max(yb, ye)));
    } else {
      hor[yb].push_back(make_pair(min(xb, xe), max(xb, xe)));
    }
  }
  int res = 0;
  if (((n - 1) - (int)vert.size()) % 2 != 0) {
    res = res ^ m;
  }
  if (((m - 1) - (int)hor.size()) % 2 != 0) {
    res = res ^ n;
  }
  map<int, vector<pair<int, int> > >::iterator it;
  vector<pair<int, int> > x;
  for (it = vert.begin(); it != vert.end(); it++) {
    x = it->second;
    sort(x.begin(), x.end());
    int y = m - getSize(x);
    vs.push_back(make_pair(y, it->first));
    res = res ^ y;
  }
  for (it = hor.begin(); it != hor.end(); it++) {
    x = it->second;
    sort(x.begin(), x.end());
    int y = n - getSize(x);
    hs.push_back(make_pair(y, it->first));
    res = res ^ y;
  }
  if (res == 0) {
    printf("SECOND\n");
  } else {
    printf("FIRST\n");
    for (int i = 0; i < ((int)vs.size()); i++) {
      int y = res ^ vs[i].first;
      if (y < vs[i].first) {
        cortev(vs[i].second, vs[i].first - y);
        return 0;
      }
    }
    for (int i = 0; i < ((int)hs.size()); i++) {
      int y = res ^ hs[i].first;
      if (y < hs[i].first) {
        corteh(hs[i].second, hs[i].first - y);
        return 0;
      }
    }
    if ((int)vs.size() < n - 1) {
      int y = res ^ m;
      if (y < m) {
        findv(m - y);
        return 0;
      }
    }
    if ((int)hs.size() < m - 1) {
      int y = res ^ n;
      if (y < n) {
        findh(n - y);
        return 0;
      }
    }
  }
  return 0;
}