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

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

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

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.r: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: F = None
        self.u: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: F = None
        self.x: F = None
        self.o: G = None
        self.q: A = None
        self.s: G = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.r: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: F = None
        self.u: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: F = None
        self.x: F = None
        self.o: G = None
        self.q: A = None
        self.s: G = None
        self.txt = txt

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

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

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