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

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: E = None
        self.w: D = None
        self.q: A = None
        self.u: D = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: E = None
        self.w: D = None
        self.q: A = None
        self.u: D = None
        self.txt = txt

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

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

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

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

k.y = d
k.o = c
k.w = c
k.t = e
f.z = g
f.q = g
f.p = c
f.w = d
f.u = b
a.t = c
a.q = b
a.u = f
i.v = a
c.v = g
d.v = a
b.v = a
g.y = e
g.o = c
g.w = c
g.t = i
n.y = d
n.o = c
n.w = c
n.t = b
e.v = a
assert g.o.v.t.v.t.v.y.v.txt == "a"