public Path cd(String newPath) {
		List<String> paths = new ArrayList<>();
		for(String s :path.split("/")){
			paths.add(s);
		}
		
		int lastIndex = paths.size();
		for(String s:newPath.split("/")){
			if(s.equals("..")){
				lastIndex--;
			}
			else{
				paths.set(lastIndex++, s);
			}
		}
		String r = "";
		for(int i=0;i<lastIndex;i++){
			String p = paths.get(i);
			r += "/" + p;
		}
		
		return new Path(r);
	}