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

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: H = None
        self.u: B = None
        self.q: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: G = None
        self.z: E = None
        self.x: G = None
        self.txt = txt

d = A("d")
l = B("l")
a = C("a")
n = D("n")
b = E("b")
g = F("g")
j = G("j")
m = H("m")
k = B("k")

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

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: H = None
        self.u: B = None
        self.q: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: G = None
        self.z: E = None
        self.x: G = None
        self.txt = txt

d = A("d")
l = B("l")
a = C("a")
n = D("n")
b = E("b")
g = F("g")
j = G("j")
m = H("m")
k = B("k")

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