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

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

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

class D:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: D = None
        self.txt = txt

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

m = A("m")
k = B("k")
b = C("b")
a = D("a")
c = E("c")
i = D("i")
h = E("h")
e = A("e")
f = E("f")

m.t = f
m.x = k
m.z = h
m.y = b
m.p = a
k.w = b
k.u = m
k.s = a
k.z = e
k.v = f
b.s = i
b.y = a
a.z = i
a.y = i
c.u = i
i.z = a
i.y = a
h.u = i
e.t = f
e.x = k
e.z = h
e.y = b
e.p = i
f.u = a
assert k.u.x.s.y.y.y.txt == "
class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: B = None
        self.z: E = None
        self.y: C = None
        self.p: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: D = None
        self.txt = txt

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

m = A("m")
k = B("k")
b = C("b")
a = D("a")
c = E("c")
i = D("i")
h = E("h")
e = A("e")
f = E("f")

m.t = f
m.x = k
m.z = h
m.y = b
m.p = a
k.w = b
k.u = m
k.s = a
k.z = e
k.v = f
b.s = i
b.y = a
a.z = i
a.y = i
c.u = i
i.z = a
i.y = a
h.u = i
e.t = f
e.x = k
e.z = h
e.y = b
e.p = i
f.u = a
assert k.u.x.s.y.y.y.txt == "i"