class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: C = None
        self.r: C = None
        self.o: H = None
        self.x: B = None
        self.v: I = None
        self.z: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: F = None
        self.q: E = None
        self.w: D = None
        self.u: E = None
        self.s: H = None
        self.t: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.y: I = None
        self.p: A = None
        self.z: F = None
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: G = None
        self.s: H = None
        self.t: G = None
        self.p: B = None
        self.x: F = None
        self.r: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: H = None
        self.o: C = None
        self.q: D = None
        self.p: D = None
        self.x: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: A = None
        self.q: A = None
        self.x: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: G = None
        self.w: C = None
        self.o: G = None
        self.q: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: F = None
        self.q: E = None
        self.w: D = None
        self.u: E = None
        self.s: H = None
        self.t: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.y: I = None
        self.p: A = None
        self.z: F = None
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: G = None
        self.s: H = None
        self.t: G = None
        self.p: B = None
        self.x: F = None
        self.r: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: H = None
        self.o: C = None
        self.q: D = None
        self.p: D = None
        self.x: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: A = None
        self.q: A = None
        self.x: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: G = None
        self.w: C = None
        self.o: G = None
        self.q: F = None
        self.txt = txt

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

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