class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.v: C = None
        self.r: E = None
        self.p: H = None
        self.z: C = None
        self.y: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.w: D = None
        self.x: A = None
        self.r: E = None
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: E = None
        self.z: E = None
        self.p: G = None
        self.t: E = None
        self.q: A = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: F = None
        self.x: C = None
        self.w: G = None
        self.p: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.w: C = None
        self.z: C = None
        self.r: I = None
        self.q: E = None
        self.v: D = None
        self.u: E = None
        self.o: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: H = None
        self.z: C = None
        self.y: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.x: G = None
        self.r: F = None
        self.p: I = None
        self.y: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: H = None
        self.r: C = None
        self.o: A = None
        self.u: E = None
        self.w: F = None
        self.txt = txt

n = A("n")
e = B("e")
a = C("a")
j = D("j")
l = E("l")
i = F("i")
d = G("d")
g = H("g")
m = I("m")
c = B("c")

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

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.w: D = None
        self.x: A = None
        self.r: E = None
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: E = None
        self.z: E = None
        self.p: G = None
        self.t: E = None
        self.q: A = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: F = None
        self.x: C = None
        self.w: G = None
        self.p: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.w: C = None
        self.z: C = None
        self.r: I = None
        self.q: E = None
        self.v: D = None
        self.u: E = None
        self.o: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: H = None
        self.z: C = None
        self.y: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.x: G = None
        self.r: F = None
        self.p: I = None
        self.y: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: H = None
        self.r: C = None
        self.o: A = None
        self.u: E = None
        self.w: F = None
        self.txt = txt

n = A("n")
e = B("e")
a = C("a")
j = D("j")
l = E("l")
i = F("i")
d = G("d")
g = H("g")
m = I("m")
c = B("c")

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