class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: B = None
        self.v: G = None
        self.o: B = None
        self.p: F = None
        self.z: C = None
        self.w: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.u: A = None
        self.x: D = None
        self.s: C = None
        self.t: F = None
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.t: H = None
        self.p: A = None
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.y: E = None
        self.p: E = None
        self.r: E = None
        self.t: D = None
        self.txt = txt

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

m = A("m")
n = B("n")
b = C("b")
h = D("h")
j = E("j")
k = F("k")
i = G("i")
f = H("f")
e = F("e")
g = G("g")

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

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.u: A = None
        self.x: D = None
        self.s: C = None
        self.t: F = None
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.t: H = None
        self.p: A = None
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.y: E = None
        self.p: E = None
        self.r: E = None
        self.t: D = None
        self.txt = txt

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

m = A("m")
n = B("n")
b = C("b")
h = D("h")
j = E("j")
k = F("k")
i = G("i")
f = H("f")
e = F("e")
g = G("g")

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