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

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.v: E = None
        self.p: D = None
        self.r: E = None
        self.o: E = None
        self.x: D = None
        self.txt = txt

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

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

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

i = A("i")
a = B("a")
k = C("k")
h = D("h")
l = E("l")
j = F("j")
e = A("e")

i.p = a
i.y = e
i.z = e
i.o = l
a.z = h
a.x = h
k.u = l
k.v = l
k.r = l
k.o = l
k.p = h
k.x = h
h.y = a
l.y = a
j.y = l
j.z = l
j.u = a
e.p = a
e.y = i
e.z = i
e.o = l
assert e.p.x.y.x.txt == "
class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.y: A = None
        self.z: A = None
        self.o: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.v: E = None
        self.p: D = None
        self.r: E = None
        self.o: E = None
        self.x: D = None
        self.txt = txt

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

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

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

i = A("i")
a = B("a")
k = C("k")
h = D("h")
l = E("l")
j = F("j")
e = A("e")

i.p = a
i.y = e
i.z = e
i.o = l
a.z = h
a.x = h
k.u = l
k.v = l
k.r = l
k.o = l
k.p = h
k.x = h
h.y = a
l.y = a
j.y = l
j.z = l
j.u = a
e.p = a
e.y = i
e.z = i
e.o = l
assert e.p.x.y.x.txt == "h"