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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: H = None
        self.o: I = None
        self.v: E = None
        self.u: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.u: H = None
        self.p: G = None
        self.v: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.r: H = None
        self.txt = txt

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

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

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

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

g = A("g")
b = B("b")
j = C("j")
d = D("d")
f = E("f")
a = F("a")
e = G("e")
i = H("i")
n = I("n")

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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: H = None
        self.o: I = None
        self.v: E = None
        self.u: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.u: H = None
        self.p: G = None
        self.v: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.r: H = None
        self.txt = txt

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

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

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

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

g = A("g")
b = B("b")
j = C("j")
d = D("d")
f = E("f")
a = F("a")
e = G("e")
i = H("i")
n = I("n")

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