class A {
public static void main
(String[]a
) { }
static String s
(int x
){String t
=x
<0?"~":"";while((x
<0?++x
:x
--)!=0)t
+="-~";return t
+0;} }
Y2xhc3MgQSB7CglwdWJsaWMgc3RhdGljIHZvaWQgbWFpbihTdHJpbmdbXWEpIHsKCQlTeXN0ZW0ub3V0LnByaW50bG4ocygtMykpOwoJCVN5c3RlbS5vdXQucHJpbnRsbihzKC0yKSk7CgkJU3lzdGVtLm91dC5wcmludGxuKHMoLTEpKTsKCQlTeXN0ZW0ub3V0LnByaW50bG4ocygwKSk7CgkJU3lzdGVtLm91dC5wcmludGxuKHMoMSkpOwoJCVN5c3RlbS5vdXQucHJpbnRsbihzKDIpKTsKCQlTeXN0ZW0ub3V0LnByaW50bG4ocygzKSk7Cgl9CglzdGF0aWMgU3RyaW5nIHMoaW50IHgpe1N0cmluZyB0PXg8MD8ifiI6IiI7d2hpbGUoKHg8MD8rK3g6eC0tKSE9MCl0Kz0iLX4iO3JldHVybiB0KzA7fQp9