public ListNode<Integer> solution(ListNode<Integer> listnode, int n) {

    ListNode<Integer> lnSecond = listnode;
    ListNode<Integer> lnFirst = listnode;
    for (int i = 0; i < n; i++) {
      lnSecond = lnSecond.next();
    }
    if (n == 0) {
      return listnode;
    }
    if (lnSecond == null) {
      System.out.println(listnode.next().getVal());
      return listnode.next();

    } else {
      while (lnSecond.next() != null) {
        lnSecond = lnSecond.next();
        lnFirst = lnFirst.next();
      }
      lnFirst.setNext(lnFirst.next().next());
      return listnode;
    }
  }