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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: E = None
        self.o: A = None
        self.txt = txt

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

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

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

g = A("g")
f = B("f")
j = C("j")
c = D("c")
i = E("i")
l = A("l")
b = D("b")
n = C("n")

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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: E = None
        self.o: A = None
        self.txt = txt

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

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

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

g = A("g")
f = B("f")
j = C("j")
c = D("c")
i = E("i")
l = A("l")
b = D("b")
n = C("n")

g.y = j
g.o = j
g.p = l
g.z = l
g.u = l
f.s = b
f.p = i
f.o = l
j.o = c
j.y = c
c.q = n
c.w = b
i.t = c
i.p = b
l.y = n
l.o = j
l.p = g
l.z = g
l.u = g
b.q = n
b.w = c
n.o = c
n.y = b
assert b.q.y.q.o.w.q.txt == "n"