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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.z: A = None
        self.p: B = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.z: A = None
        self.p: B = None
        self.txt = txt

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

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

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

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

b.t = h
b.p = i
b.v = k
b.o = e
e.r = i
e.z = b
e.p = h
c.o = h
c.x = k
i.x = e
a.y = e
k.o = h
k.x = c
h.r = i
h.z = b
h.p = e
assert e.z.v.o.r.x.txt == "e"