class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.y: H = None
        self.u: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: I = None
        self.v: E = None
        self.z: D = None
        self.x: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: E = None
        self.v: H = None
        self.u: A = None
        self.z: H = None
        self.t: F = None
        self.r: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.t: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.z: I = None
        self.y: D = None
        self.r: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: I = None
        self.v: E = None
        self.z: D = None
        self.x: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: E = None
        self.v: H = None
        self.u: A = None
        self.z: H = None
        self.t: F = None
        self.r: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.t: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.z: I = None
        self.y: D = None
        self.r: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

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