class A:
    def __init__(self, txt: str):
        self.q: I = None
        self.p: I = None
        self.o: B = None
        self.t: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.s: I = None
        self.w: A = None
        self.o: B = None
        self.z: B = None
        self.u: A = None
        self.txt = txt

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

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.s: I = None
        self.w: A = None
        self.o: B = None
        self.z: B = None
        self.u: A = None
        self.txt = txt

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

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

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

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

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

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