output_description: If it is possible to go to Island N by using two boat services, print
  `POSSIBLE`; otherwise, print `IMPOSSIBLE`.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N M
      a_1 b_1
      a_2 b_2
      :
      a_M b_M
attempt: #!/usr/bin/env python3
  # -*- coding: utf-8 -*-
  """
  Created on 2019/3/23
  Solved on 2019/3/
  @author: shinjisu
  """
  
  
  # ABC 068 C - Cat Snuke and a Voyage
  import bisect
  
  # import numpy as np
  
  
  def getInt():
      return int(input())
  
  
  def getIntList():
      return [int(x) for x in input().split()]
  
  
  # def getIntList(): return np.array(input().split(), dtype=np.longlong)
  
  
  def zeros(n):
      return [0] * n
  
  
  # def zeros(n): return np.zeros(n, dtype=np.longlong)
  
  
  def zeros2(n, m):
      return [zeros(m) for i in range(n)]  # obsoleted zeros((n, m))で代替
  
  
  class Debug:
      def __init__(self):
          self.debug = True
  
      def off(self):
          self.debug = False
  
      def dmp(self, x, cmt=""):
          if self.debug:
              if cmt != "":
                  print(cmt, ":  ", end="")
              print(x)
          return x
  
  
  def prob():
      d = Debug()
      d.off()
      N, M = getIntList()
      d.dmp((N, M), "N, M")
      ship = set()
      for i in range(M):
          a, b = getIntList()
          ship.add((a, b))
      d.dmp((ship), "ship")
      for i in range(2, N):
          if ((1, i) in ship or (i, 1) in ship) and ((i, N) in ship or (N, 1) in ship):
              return "POSSIBLE"
      return "IMPOSSIBLE"
  
  
  ans = prob()
  if ans is None:
      pass
  elif type(ans) == tuple and ans[0] == 1:  # 1,ans
      for elm in ans[1]:
          print(elm)
  else:
      print(ans)
  
problem_description: Statement
  
  In Takahashi Kingdom, there is an archipelago of N islands, called Takahashi
  Islands. For convenience, we will call them Island 1, Island 2, ..., Island N.
  
  There are M kinds of regular boat services between these islands. Each service
  connects two islands. The i-th service connects Island a_i and Island b_i.
  
  Cat Snuke is on Island 1 now, and wants to go to Island N. However, it turned
  out that there is no boat service from Island 1 to Island N, so he wants to
  know whether it is possible to go to Island N by using two boat services.
  
  Help him.
samples: [{"input": "3 2\n    1 2\n    2 3", "output": "POSSIBLE\n    \n\n* * *"}, {"input": "4 3\n    1 2\n    2 3\n    3 4", "output": "IMPOSSIBLE\n    \n\nYou have to use three boat services to get to Island 4.\n\n* * *"}, {"input": "100000 1\n    1 99999", "output": "IMPOSSIBLE\n    \n\n* * *"}, {"input": "5 5\n    1 3\n    4 5\n    2 3\n    2 4\n    1 4", "output": "POSSIBLE\n    \n\nYou can get to Island 5 by using two boat services: Island 1 -> Island 4 ->\nIsland 5."}]