class A:
    def __init__(self, txt: str):
        self.r: J = None
        self.z: F = None
        self.s: F = None
        self.w: C = None
        self.t: J = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: H = None
        self.o: I = None
        self.s: A = None
        self.y: E = None
        self.w: E = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: A = None
        self.o: G = None
        self.t: J = None
        self.r: H = None
        self.s: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.s: J = None
        self.p: D = None
        self.v: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: D = None
        self.y: D = None
        self.v: A = None
        self.o: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: H = None
        self.w: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: H = None
        self.o: I = None
        self.s: A = None
        self.y: E = None
        self.w: E = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: A = None
        self.o: G = None
        self.t: J = None
        self.r: H = None
        self.s: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.s: J = None
        self.p: D = None
        self.v: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: D = None
        self.y: D = None
        self.v: A = None
        self.o: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: H = None
        self.w: D = None
        self.txt = txt

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

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