-1
import java.util.*;
public class path1 {
public static void main(String[] args) {
//Maze design 1 indicate a cell with obstacles
int[][] grid = new int[][]{{0, 0, 1, 0, 0, 0}, {0, 0, 1, 0, 0, 0}, {0, 0, 0, 0, 1, 0}, {0, 0, 1, 1, 1, 0}, {0, 0, 0, 0, 1, 0}};
//Initial position of the Ro...