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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: E = None
        self.u: C = None
        self.v: E = None
        self.s: C = None
        self.z: D = None
        self.txt = txt

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

c.u = b
c.r = b
c.v = l
c.y = m
f.w = n
f.p = c
f.t = c
f.s = k
j.u = g
j.y = g
j.x = k
j.s = k
b.u = j
b.p = m
b.y = m
b.r = c
b.o = f
g.w = n
g.v = n
g.u = j
g.s = e
g.z = b
k.u = b
k.r = b
k.v = l
k.y = f
l.u = b
l.r = b
l.v = k
l.y = f
e.u = g
e.y = g
e.x = l
e.s = l
n.w = g
n.v = g
n.u = e
n.s = j
n.z = b
m.w = g
m.p = k
m.t = c
m.s = c
assert n.s.y.v.txt == "
class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.v: A = None
        self.y: B = None
        self.r: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: E = None
        self.u: C = None
        self.v: E = None
        self.s: C = None
        self.z: D = None
        self.txt = txt

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

c.u = b
c.r = b
c.v = l
c.y = m
f.w = n
f.p = c
f.t = c
f.s = k
j.u = g
j.y = g
j.x = k
j.s = k
b.u = j
b.p = m
b.y = m
b.r = c
b.o = f
g.w = n
g.v = n
g.u = j
g.s = e
g.z = b
k.u = b
k.r = b
k.v = l
k.y = f
l.u = b
l.r = b
l.v = k
l.y = f
e.u = g
e.y = g
e.x = l
e.s = l
n.w = g
n.v = g
n.u = e
n.s = j
n.z = b
m.w = g
m.p = k
m.t = c
m.s = c
assert n.s.y.v.txt == "n"