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

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

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

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

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

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

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

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

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

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

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

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

i.t = f
i.x = f
i.y = j
i.u = g
i.v = g
c.v = i
f.o = i
f.p = g
f.x = a
a.u = i
a.z = i
a.v = c
a.x = e
j.q = f
e.v = i
g.u = i
g.z = i
g.v = e
g.x = c
h.o = i
h.p = a
h.x = a
b.v = i
k.q = f
assert k.q.p.u.t.p.x.v.v.txt == "g"