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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.t: B = None
        self.z: A = None
        self.x: A = None
        self.s: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: J = None
        self.s: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: A = None
        self.x: G = None
        self.t: D = None
        self.y: J = None
        self.v: A = None
        self.s: D = None
        self.p: F = None
        self.r: A = None
        self.w: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.t: B = None
        self.z: A = None
        self.x: A = None
        self.s: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: J = None
        self.s: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: A = None
        self.x: G = None
        self.t: D = None
        self.y: J = None
        self.v: A = None
        self.s: D = None
        self.p: F = None
        self.r: A = None
        self.w: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

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