class A:
    def __init__(self, txt: str):
        self.t: J = None
        self.p: C = None
        self.o: C = None
        self.q: E = None
        self.r: H = None
        self.s: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.o: C = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: B = None
        self.w: G = None
        self.u: H = None
        self.o: F = None
        self.q: F = None
        self.z: J = None
        self.p: B = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.o: C = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: B = None
        self.w: G = None
        self.u: H = None
        self.o: F = None
        self.q: F = None
        self.z: J = None
        self.p: B = None
        self.txt = txt

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

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

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