import java.io.*;
class Ideone {
public static void main
(String[] args
) { String dirPath
= "/home/daniela/oknok/data/uploads/23980dc32e16792007de3343f1f99211/"; System.
out.
println(dirPath.
substring(dirPath.
substring(0, dirPath.
length() - 1).
lastIndexOf("/"))); System.
out.
println("/" + new File(dirPath
).
getName() + "/"); }
}
aW1wb3J0IGphdmEuaW8uKjsKCmNsYXNzIElkZW9uZSB7CglwdWJsaWMgc3RhdGljIHZvaWQgbWFpbiAoU3RyaW5nW10gYXJncykJewoJCVN0cmluZyBkaXJQYXRoID0gIi9ob21lL2RhbmllbGEvb2tub2svZGF0YS91cGxvYWRzLzIzOTgwZGMzMmUxNjc5MjAwN2RlMzM0M2YxZjk5MjExLyI7CgkJU3lzdGVtLm91dC5wcmludGxuKGRpclBhdGguc3Vic3RyaW5nKGRpclBhdGguc3Vic3RyaW5nKDAsIGRpclBhdGgubGVuZ3RoKCkgLSAxKS5sYXN0SW5kZXhPZigiLyIpKSk7CiAgICAJU3lzdGVtLm91dC5wcmludGxuKG5ldyBGaWxlKGRpclBhdGgpLmdldE5hbWUoKSk7CiAgICAJU3lzdGVtLm91dC5wcmludGxuKCIvIiArIG5ldyBGaWxlKGRpclBhdGgpLmdldE5hbWUoKSArICIvIik7Cgl9Cn0=