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

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

class C:
    def __init__(self, txt: str):
        self.s: C = None
        self.z: C = None
        self.v: D = None
        self.u: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: C = None
        self.x: D = None
        self.z: A = None
        self.u: E = None
        self.txt = txt

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

f = A("f")
n = B("n")
g = C("g")
b = D("b")
k = E("k")
d = D("d")
a = D("a")
m = A("m")
h = E("h")
j = C("j")

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

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

class C:
    def __init__(self, txt: str):
        self.s: C = None
        self.z: C = None
        self.v: D = None
        self.u: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: C = None
        self.x: D = None
        self.z: A = None
        self.u: E = None
        self.txt = txt

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

f = A("f")
n = B("n")
g = C("g")
b = D("b")
k = E("k")
d = D("d")
a = D("a")
m = A("m")
h = E("h")
j = C("j")

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