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

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

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

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

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

i = A("i")
l = B("l")
k = C("k")
e = D("e")
g = E("g")
b = D("b")
j = E("j")
a = E("a")

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

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

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

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

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

i = A("i")
l = B("l")
k = C("k")
e = D("e")
g = E("g")
b = D("b")
j = E("j")
a = E("a")

i.t = g
i.u = b
i.v = l
l.t = b
l.z = i
l.r = e
k.x = e
k.o = e
k.p = i
e.z = i
e.w = i
g.u = i
g.r = i
g.o = l
g.v = k
g.w = a
b.z = i
b.w = i
j.u = i
j.r = i
j.o = l
j.v = k
j.w = a
a.u = i
a.r = i
a.o = l
a.v = k
a.w = j
assert k.x.z.v.z.t.v.p.t.txt == "g"