Java Interface Hackerrank Solution Python Code For Snake