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

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

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

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: A = None
        self.q: D = None
        self.y: B = None
        self.t: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.r: D = None
        self.x: C = None
        self.p: C = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: A = None
        self.q: D = None
        self.y: B = None
        self.t: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.r: D = None
        self.x: C = None
        self.p: C = None
        self.txt = txt

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

l.o = c
l.z = c
l.t = a
l.x = n
l.r = i
i.o = n
i.y = c
i.x = l
i.w = h
n.u = g
n.o = g
n.t = m
n.s = a
n.x = h
m.p = l
m.w = b
m.q = c
m.y = i
m.t = n
a.z = i
a.r = m
a.x = n
a.p = n
b.o = c
b.z = c
b.t = g
b.x = h
b.r = i
h.u = g
h.o = g
h.s = g
h.t = m
h.x = n
g.z = i
g.r = m
g.x = n
g.p = h
c.p = b
c.w = b
c.q = m
c.y = i
c.t = n
d.o = m
d.t = g
d.x = h
d.z = c
d.r = i
assert g.z.y.y.y.t.x.x.o.z.y.txt == "c"