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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: C = None
        self.r: C = None
        self.p: G = None
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.p: F = None
        self.t: A = None
        self.x: H = None
        self.u: F = None
        self.q: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: G = None
        self.t: G = None
        self.p: G = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: A = None
        self.u: G = None
        self.p: D = None
        self.y: G = None
        self.w: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: G = None
        self.u: B = None
        self.o: D = None
        self.x: F = None
        self.v: B = None
        self.q: G = None
        self.w: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: C = None
        self.r: C = None
        self.p: G = None
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.p: F = None
        self.t: A = None
        self.x: H = None
        self.u: F = None
        self.q: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: G = None
        self.t: G = None
        self.p: G = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: A = None
        self.u: G = None
        self.p: D = None
        self.y: G = None
        self.w: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: G = None
        self.u: B = None
        self.o: D = None
        self.x: F = None
        self.v: B = None
        self.q: G = None
        self.w: E = None
        self.txt = txt

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

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