class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: D = None
        self.o: D = None
        self.w: E = None
        self.p: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.s: E = None
        self.y: D = None
        self.z: C = None
        self.t: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: B = None
        self.r: E = None
        self.w: E = None
        self.t: H = None
        self.u: F = None
        self.p: G = None
        self.o: G = None
        self.v: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: D = None
        self.q: F = None
        self.y: G = None
        self.w: H = None
        self.z: I = None
        self.x: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: G = None
        self.u: I = None
        self.z: A = None
        self.x: E = None
        self.t: B = None
        self.q: H = None
        self.p: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.s: E = None
        self.y: D = None
        self.z: C = None
        self.t: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: B = None
        self.r: E = None
        self.w: E = None
        self.t: H = None
        self.u: F = None
        self.p: G = None
        self.o: G = None
        self.v: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: D = None
        self.q: F = None
        self.y: G = None
        self.w: H = None
        self.z: I = None
        self.x: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: G = None
        self.u: I = None
        self.z: A = None
        self.x: E = None
        self.t: B = None
        self.q: H = None
        self.p: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

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

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