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

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

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

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.w: E = None
        self.r: E = None
        self.y: C = None
        self.txt = txt

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

m = A("m")
c = B("c")
b = C("b")
j = D("j")
g = E("g")
a = E("a")
n = B("n")

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.w: E = None
        self.r: E = None
        self.y: C = None
        self.txt = txt

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

m = A("m")
c = B("c")
b = C("b")
j = D("j")
g = E("g")
a = E("a")
n = B("n")

m.y = j
m.z = g
m.u = g
m.q = c
c.w = b
c.u = b
c.x = n
c.y = j
c.q = a
b.r = g
b.p = g
b.u = j
b.q = a
b.o = a
j.s = b
j.y = b
j.w = g
j.r = g
g.y = j
g.x = j
g.u = j
g.s = m
g.o = n
a.y = j
a.x = j
a.u = j
a.s = m
a.o = c
n.w = b
n.u = b
n.x = c
n.y = j
n.q = a
assert c.q.s.q.u.u.txt == "j"