class A:
    def __init__(self, txt: str):
        self.w: I = None
        self.o: C = None
        self.y: G = None
        self.p: D = None
        self.r: C = None
        self.v: H = None
        self.t: D = None
        self.z: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: I = None
        self.s: E = None
        self.p: E = None
        self.t: H = None
        self.z: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.o: F = None
        self.y: A = None
        self.v: A = None
        self.q: C = None
        self.r: B = None
        self.u: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: E = None
        self.y: H = None
        self.r: E = None
        self.u: I = None
        self.v: B = None
        self.x: E = None
        self.z: B = None
        self.t: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: F = None
        self.q: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: I = None
        self.s: E = None
        self.p: E = None
        self.t: H = None
        self.z: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.o: F = None
        self.y: A = None
        self.v: A = None
        self.q: C = None
        self.r: B = None
        self.u: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: E = None
        self.y: H = None
        self.r: E = None
        self.u: I = None
        self.v: B = None
        self.x: E = None
        self.z: B = None
        self.t: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: F = None
        self.q: B = None
        self.txt = txt

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

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