class GuardedQueue {
  private final Queue<Integer> sourceList;

  public GuardedQueue() {
    this.sourceList = new LinkedList<>();
  }

  /**
   * Get the last element of the queue is exists.
   *
   * @return last element of a queue if queue is not empty
   */
  public synchronized Integer get() {<FILL_FUNCTION_BODY>}

  /**
   * Put a value in the queue.
   *
   * @param e number which we want to put to our queue
   */
  public synchronized void put(Integer e) {
    LOGGER.info("putting");
    sourceList.add(e);
    LOGGER.info("notifying");
    notify();
  }
}

    while (sourceList.isEmpty()) {
      try {
        LOGGER.info("waiting");
        wait();
      } catch (InterruptedException e) {
        e.printStackTrace();
      }
    }
    LOGGER.info("getting");
    return sourceList.peek();
  
<no_super_class>