text: # This file is initialized with a code version of this
  # question's sample test case. Feel free to add, edit,
  # or remove test cases in this file as you see fit!
  
  import program
  import unittest
  
  
  class StartLinkedList:
      def __init__(self, value):
          self.value = value
          self.next = None
  
  
  linkedListClass = StartLinkedList
  if hasattr(program, "LinkedList"):
      linkedListClass = program.LinkedList
  
  
  class LinkedList(linkedListClass):
      def addMany(self, values):
          current = self
          while current.next is not None:
              current = current.next
          for value in values:
              current.next = LinkedList(value)
              current = current.next
          return self
  
      def getNodesInArray(self):
          nodes = []
          current = self
          while current is not None:
              nodes.append(current.value)
              current = current.next
          return nodes
  
  
  class TestProgram(unittest.TestCase):
      def test_case_1(self):
          test = LinkedList(0).addMany([1, 2, 3, 4, 5, 6, 7, 8, 9])
          expected = LinkedList(0).addMany([1, 2, 3, 4, 5, 7, 8, 9])
          program.removeKthNodeFromEnd(test, 4)
          self.assertEqual(test.getNodesInArray(), expected.getNodesInArray())
      
      def test_case_2(self):
          test = LinkedList(0).addMany([1, 2])
          expected = LinkedList(0).addMany([1, 2])
          program.removeKthNodeFromEnd(test, 4)
          self.assertEqual(test.getNodesInArray(), expected.getNodesInArray())
      
      def test_case_3(self):
          test = LinkedList(0).addMany([1, 2, 3])
          expected = LinkedList(1).addMany([2, 3])
          program.removeKthNodeFromEnd(test, 4)
          self.assertEqual(test.getNodesInArray(), expected.getNodesInArray())
  
      def test_case_4(self):
          test = LinkedList(0).addMany([1, 2, 3])
          expected = LinkedList(0).addMany([1, 2])
          program.removeKthNodeFromEnd(test, 1)
          self.assertEqual(test.getNodesInArray(), expected.getNodesInArray())
  
  if __name__ == "__main__":
      unittest.main()