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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.z: C = None
        self.x: E = None
        self.t: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: B = None
        self.w: E = None
        self.t: E = None
        self.txt = txt

l = A("l")
j = B("j")
a = C("a")
e = D("e")
m = E("m")
h = E("h")
f = A("f")
b = C("b")

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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.z: C = None
        self.x: E = None
        self.t: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: B = None
        self.w: E = None
        self.t: E = None
        self.txt = txt

l = A("l")
j = B("j")
a = C("a")
e = D("e")
m = E("m")
h = E("h")
f = A("f")
b = C("b")

l.p = e
l.z = m
l.u = a
l.t = f
j.r = h
j.x = h
j.z = b
j.t = f
a.r = b
a.t = b
a.z = j
e.v = l
e.s = b
e.q = h
e.z = h
m.p = e
m.x = j
m.w = h
m.t = h
h.p = e
h.x = j
h.w = m
h.t = m
f.p = e
f.z = m
f.u = b
f.t = l
b.r = a
b.t = a
b.z = j
assert a.t.t.z.txt == "j"