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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: A = None
        self.s: C = None
        self.q: H = None
        self.w: I = None
        self.t: A = None
        self.txt = txt

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

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

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

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

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

c = A("c")
m = B("m")
e = C("e")
g = D("g")
l = E("l")
h = F("h")
a = G("a")
i = H("i")
b = I("b")
k = J("k")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: A = None
        self.s: C = None
        self.q: H = None
        self.w: I = None
        self.t: A = None
        self.txt = txt

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

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

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

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

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

c = A("c")
m = B("m")
e = C("e")
g = D("g")
l = E("l")
h = F("h")
a = G("a")
i = H("i")
b = I("b")
k = J("k")

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