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

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.o: D = None
        self.r: A = None
        self.y: C = None
        self.txt = txt

i = A("i")
f = B("f")
m = C("m")
n = D("n")
h = E("h")
e = C("e")
j = A("j")
k = A("k")

i.z = h
i.p = m
i.y = f
i.v = f
i.t = n
f.y = m
m.z = h
n.w = k
n.q = k
n.r = m
h.x = n
h.o = n
h.r = j
h.y = e
e.z = h
j.z = h
j.p = e
j.y = f
j.v = f
j.t = n
k.z = h
k.p = e
k.y = f
k.v = f
k.t = n
assert i.t.w.y.txt == "
class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.p: C = None
        self.y: B = None
        self.t: D = None
        self.v: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.o: D = None
        self.r: A = None
        self.y: C = None
        self.txt = txt

i = A("i")
f = B("f")
m = C("m")
n = D("n")
h = E("h")
e = C("e")
j = A("j")
k = A("k")

i.z = h
i.p = m
i.y = f
i.v = f
i.t = n
f.y = m
m.z = h
n.w = k
n.q = k
n.r = m
h.x = n
h.o = n
h.r = j
h.y = e
e.z = h
j.z = h
j.p = e
j.y = f
j.v = f
j.t = n
k.z = h
k.p = e
k.y = f
k.v = f
k.t = n
assert i.t.w.y.txt == "f"