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

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: A = None
        self.q: E = None
        self.s: G = None
        self.r: I = None
        self.p: H = None
        self.u: I = None
        self.z: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.w: B = None
        self.y: G = None
        self.z: H = None
        self.q: G = None
        self.v: B = None
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: B = None
        self.r: D = None
        self.u: D = None
        self.p: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.z: C = None
        self.s: A = None
        self.u: A = None
        self.y: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.y: E = None
        self.p: F = None
        self.o: G = None
        self.r: D = None
        self.v: D = None
        self.q: G = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: A = None
        self.q: E = None
        self.s: G = None
        self.r: I = None
        self.p: H = None
        self.u: I = None
        self.z: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.w: B = None
        self.y: G = None
        self.z: H = None
        self.q: G = None
        self.v: B = None
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: B = None
        self.r: D = None
        self.u: D = None
        self.p: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.z: C = None
        self.s: A = None
        self.u: A = None
        self.y: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.y: E = None
        self.p: F = None
        self.o: G = None
        self.r: D = None
        self.v: D = None
        self.q: G = None
        self.txt = txt

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

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

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