class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: C = None
        self.u: A = None
        self.w: B = None
        self.y: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: E = None
        self.w: A = None
        self.y: C = None
        self.txt = txt

g = A("g")
a = B("a")
n = C("n")
c = D("c")
m = E("m")
l = C("l")
j = A("j")
d = E("d")
h = E("h")
i = E("i")

g.z = c
g.o = n
g.y = n
g.u = j
g.w = a
a.w = g
a.y = g
a.v = c
n.q = c
n.v = i
n.x = h
c.u = a
m.p = i
m.w = g
m.y = l
l.q = c
l.v = m
l.x = m
j.z = c
j.o = l
j.u = g
j.w = a
j.y = n
d.p = h
d.w = g
d.y = l
h.p = m
h.w = g
h.y = l
i.p = m
i.w = g
i.y = n
assert i.y.v.p.w.o.v.p.y.q.u.txt == "
class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: C = None
        self.u: A = None
        self.w: B = None
        self.y: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: E = None
        self.w: A = None
        self.y: C = None
        self.txt = txt

g = A("g")
a = B("a")
n = C("n")
c = D("c")
m = E("m")
l = C("l")
j = A("j")
d = E("d")
h = E("h")
i = E("i")

g.z = c
g.o = n
g.y = n
g.u = j
g.w = a
a.w = g
a.y = g
a.v = c
n.q = c
n.v = i
n.x = h
c.u = a
m.p = i
m.w = g
m.y = l
l.q = c
l.v = m
l.x = m
j.z = c
j.o = l
j.u = g
j.w = a
j.y = n
d.p = h
d.w = g
d.y = l
h.p = m
h.w = g
h.y = l
i.p = m
i.w = g
i.y = n
assert i.y.v.p.w.o.v.p.y.q.u.txt == "a"