class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.p: A = None
        self.x: C = None
        self.s: C = None
        self.w: A = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.r: C = None
        self.o: A = None
        self.q: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: B = None
        self.o: C = None
        self.q: E = None
        self.s: E = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.r: C = None
        self.o: A = None
        self.q: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: B = None
        self.o: C = None
        self.q: E = None
        self.s: E = None
        self.txt = txt

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

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

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