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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: H = None
        self.v: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.v: C = None
        self.s: D = None
        self.q: B = None
        self.txt = txt

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

m = A("m")
k = B("k")
j = C("j")
h = D("h")
a = E("a")
c = F("c")
b = G("b")
i = H("i")
n = H("n")
d = C("d")

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: H = None
        self.v: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.v: C = None
        self.s: D = None
        self.q: B = None
        self.txt = txt

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

m = A("m")
k = B("k")
j = C("j")
h = D("h")
a = E("a")
c = F("c")
b = G("b")
i = H("i")
n = H("n")
d = C("d")

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