class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: F = None
        self.t: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: A = None
        self.z: H = None
        self.w: I = None
        self.s: F = None
        self.y: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: F = None
        self.p: D = None
        self.u: I = None
        self.w: E = None
        self.y: G = None
        self.t: A = None
        self.x: I = None
        self.s: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: I = None
        self.x: G = None
        self.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.r: C = None
        self.y: B = None
        self.z: C = None
        self.w: G = None
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: C = None
        self.q: D = None
        self.w: D = None
        self.y: D = None
        self.u: B = None
        self.s: C = None
        self.v: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: A = None
        self.z: H = None
        self.w: I = None
        self.s: F = None
        self.y: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: F = None
        self.p: D = None
        self.u: I = None
        self.w: E = None
        self.y: G = None
        self.t: A = None
        self.x: I = None
        self.s: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: I = None
        self.x: G = None
        self.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.r: C = None
        self.y: B = None
        self.z: C = None
        self.w: G = None
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: C = None
        self.q: D = None
        self.w: D = None
        self.y: D = None
        self.u: B = None
        self.s: C = None
        self.v: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

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

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