class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.t: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: G = None
        self.s: D = None
        self.p: C = None
        self.y: H = None
        self.q: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.r: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.s: H = None
        self.x: G = None
        self.p: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.q: G = None
        self.x: J = None
        self.t: B = None
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.p: I = None
        self.v: J = None
        self.s: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: J = None
        self.y: C = None
        self.s: D = None
        self.t: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: B = None
        self.r: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: F = None
        self.y: C = None
        self.s: E = None
        self.v: F = None
        self.txt = txt

h = A("h")
g = B("g")
b = C("b")
f = D("f")
n = E("n")
l = F("l")
c = G("c")
d = H("d")
i = I("i")
e = J("e")

h.u = n
h.t = b
g.o = c
g.u = c
g.s = f
g.p = b
g.y = d
g.q = e
b.w = c
b.r = h
f.t = d
f.s = d
f.x = c
f.p = i
n.v = c
n.q = c
n.x = e
n.t = g
n.w = f
l.y = c
l.p = i
l.s = i
l.v = e
c.u = e
c.y = b
c.s = f
c.t = d
d.r = g
i.z = f
i.x = g
i.r = b
e.q = g
e.u = l
e.v = l
e.y = b
e.s = n
assert l.v.s.t.y.r.p.r.u.txt == "
class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.t: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: G = None
        self.s: D = None
        self.p: C = None
        self.y: H = None
        self.q: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.r: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.s: H = None
        self.x: G = None
        self.p: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.q: G = None
        self.x: J = None
        self.t: B = None
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.p: I = None
        self.v: J = None
        self.s: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: J = None
        self.y: C = None
        self.s: D = None
        self.t: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: B = None
        self.r: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: F = None
        self.y: C = None
        self.s: E = None
        self.v: F = None
        self.txt = txt

h = A("h")
g = B("g")
b = C("b")
f = D("f")
n = E("n")
l = F("l")
c = G("c")
d = H("d")
i = I("i")
e = J("e")

h.u = n
h.t = b
g.o = c
g.u = c
g.s = f
g.p = b
g.y = d
g.q = e
b.w = c
b.r = h
f.t = d
f.s = d
f.x = c
f.p = i
n.v = c
n.q = c
n.x = e
n.t = g
n.w = f
l.y = c
l.p = i
l.s = i
l.v = e
c.u = e
c.y = b
c.s = f
c.t = d
d.r = g
i.z = f
i.x = g
i.r = b
e.q = g
e.u = l
e.v = l
e.y = b
e.s = n
assert l.v.s.t.y.r.p.r.u.txt == "n"