class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.x: F = None
        self.t: D = None
        self.u: E = None
        self.y: D = None
        self.s: E = None
        self.z: J = None
        self.q: F = None
        self.p: D = None
        self.r: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.y: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: J = None
        self.r: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: D = None
        self.y: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: A = None
        self.r: C = None
        self.u: G = None
        self.y: A = None
        self.s: G = None
        self.t: C = None
        self.o: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: H = None
        self.q: B = None
        self.z: H = None
        self.o: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: H = None
        self.q: B = None
        self.r: A = None
        self.u: E = None
        self.o: H = None
        self.p: I = None
        self.v: F = None
        self.txt = txt

j = A("j")
m = B("m")
n = C("n")
a = D("a")
d = E("d")
k = F("k")
e = G("e")
f = H("f")
h = I("h")
b = J("b")

j.r = d
m.r = f
m.v = k
m.z = d
n.w = f
n.x = k
n.q = k
n.t = a
n.y = a
n.p = a
n.u = d
n.s = d
n.z = b
n.r = j
a.u = k
a.y = m
d.t = b
d.r = a
k.t = e
k.r = a
k.y = m
e.t = j
e.z = k
f.p = m
f.x = j
f.y = j
f.r = n
f.t = n
f.u = e
f.s = e
f.o = h
h.x = f
h.z = f
h.q = m
h.o = a
b.t = m
b.q = m
b.y = f
b.o = f
b.r = j
b.u = d
b.p = h
b.v = k
assert b.v.t.z.t.z.t.z.r.u.t.txt == "
class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.x: F = None
        self.t: D = None
        self.u: E = None
        self.y: D = None
        self.s: E = None
        self.z: J = None
        self.q: F = None
        self.p: D = None
        self.r: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.y: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: J = None
        self.r: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: D = None
        self.y: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: A = None
        self.r: C = None
        self.u: G = None
        self.y: A = None
        self.s: G = None
        self.t: C = None
        self.o: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: H = None
        self.q: B = None
        self.z: H = None
        self.o: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: H = None
        self.q: B = None
        self.r: A = None
        self.u: E = None
        self.o: H = None
        self.p: I = None
        self.v: F = None
        self.txt = txt

j = A("j")
m = B("m")
n = C("n")
a = D("a")
d = E("d")
k = F("k")
e = G("e")
f = H("f")
h = I("h")
b = J("b")

j.r = d
m.r = f
m.v = k
m.z = d
n.w = f
n.x = k
n.q = k
n.t = a
n.y = a
n.p = a
n.u = d
n.s = d
n.z = b
n.r = j
a.u = k
a.y = m
d.t = b
d.r = a
k.t = e
k.r = a
k.y = m
e.t = j
e.z = k
f.p = m
f.x = j
f.y = j
f.r = n
f.t = n
f.u = e
f.s = e
f.o = h
h.x = f
h.z = f
h.q = m
h.o = a
b.t = m
b.q = m
b.y = f
b.o = f
b.r = j
b.u = d
b.p = h
b.v = k
assert b.v.t.z.t.z.t.z.r.u.t.txt == "e"