class A:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.o: G = None
        self.x: C = None
        self.u: I = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.r: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: C = None
        self.w: H = None
        self.x: D = None
        self.r: A = None
        self.y: H = None
        self.u: H = None
        self.p: D = None
        self.s: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: J = None
        self.z: I = None
        self.p: G = None
        self.y: H = None
        self.w: D = None
        self.u: E = None
        self.s: A = None
        self.x: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: E = None
        self.p: J = None
        self.t: C = None
        self.q: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.t: A = None
        self.r: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.r: I = None
        self.o: F = None
        self.u: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.o: G = None
        self.x: C = None
        self.u: I = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.r: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: C = None
        self.w: H = None
        self.x: D = None
        self.r: A = None
        self.y: H = None
        self.u: H = None
        self.p: D = None
        self.s: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: J = None
        self.z: I = None
        self.p: G = None
        self.y: H = None
        self.w: D = None
        self.u: E = None
        self.s: A = None
        self.x: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: E = None
        self.p: J = None
        self.t: C = None
        self.q: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.t: A = None
        self.r: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.r: I = None
        self.o: F = None
        self.u: E = None
        self.txt = txt

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

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