class A:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: G = None
        self.t: H = None
        self.s: E = None
        self.w: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: A = None
        self.r: F = None
        self.o: C = None
        self.x: C = None
        self.w: G = None
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.r: B = None
        self.v: H = None
        self.z: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: B = None
        self.o: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: A = None
        self.y: D = None
        self.z: A = None
        self.q: D = None
        self.r: A = None
        self.o: G = None
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: F = None
        self.u: H = None
        self.y: B = None
        self.p: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: G = None
        self.v: A = None
        self.txt = txt

m = A("m")
l = B("l")
n = C("n")
e = D("e")
g = E("g")
k = F("k")
c = G("c")
d = H("d")

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

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: A = None
        self.r: F = None
        self.o: C = None
        self.x: C = None
        self.w: G = None
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.r: B = None
        self.v: H = None
        self.z: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: B = None
        self.o: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: A = None
        self.y: D = None
        self.z: A = None
        self.q: D = None
        self.r: A = None
        self.o: G = None
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: F = None
        self.u: H = None
        self.y: B = None
        self.p: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: G = None
        self.v: A = None
        self.txt = txt

m = A("m")
l = B("l")
n = C("n")
e = D("e")
g = E("g")
k = F("k")
c = G("c")
d = H("d")

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