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

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

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

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

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

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

i.x = l
i.p = l
i.t = j
k.t = l
k.w = i
f.z = e
e.o = j
j.u = l
j.t = l
j.x = l
j.w = e
l.u = j
l.t = j
l.x = j
l.w = e
m.t = j
m.w = i
n.t = j
n.w = i
assert k.t.x.t.w.o.w.txt == "
class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.t: E = None
        self.p: E = None
        self.txt = txt

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

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

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

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

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

i.x = l
i.p = l
i.t = j
k.t = l
k.w = i
f.z = e
e.o = j
j.u = l
j.t = l
j.x = l
j.w = e
l.u = j
l.t = j
l.x = j
l.w = e
m.t = j
m.w = i
n.t = j
n.w = i
assert k.t.x.t.w.o.w.txt == "e"