class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: G = None
        self.v: C = None
        self.q: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.w: F = None
        self.p: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: I = None
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: J = None
        self.y: G = None
        self.x: D = None
        self.q: I = None
        self.z: H = None
        self.w: E = None
        self.v: J = None
        self.s: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: I = None
        self.s: J = None
        self.t: H = None
        self.q: E = None
        self.w: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.z: D = None
        self.txt = txt

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

k = A("k")
b = B("b")
n = C("n")
m = D("m")
l = E("l")
i = F("i")
e = G("e")
d = H("d")
j = I("j")
h = J("h")

k.r = n
k.v = n
k.p = e
k.q = m
b.x = e
b.w = i
b.p = n
n.s = e
n.t = e
n.q = i
m.t = h
m.x = n
m.s = l
m.v = k
l.z = i
l.y = j
l.q = n
i.t = h
i.v = h
i.y = e
i.s = e
i.x = m
i.q = j
i.z = d
i.w = l
e.o = j
e.s = h
e.t = d
e.q = l
e.w = n
d.u = e
d.z = m
d.o = m
d.q = m
d.p = l
d.s = n
d.r = h
d.x = h
d.t = k
j.q = m
j.z = m
h.x = i
h.y = i
h.o = k
h.r = k
h.w = k
h.q = d
h.v = e
h.u = e
h.z = m
assert h.o.q.x.t.s.x.txt == "
class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: G = None
        self.v: C = None
        self.q: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.w: F = None
        self.p: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: I = None
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: J = None
        self.y: G = None
        self.x: D = None
        self.q: I = None
        self.z: H = None
        self.w: E = None
        self.v: J = None
        self.s: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: I = None
        self.s: J = None
        self.t: H = None
        self.q: E = None
        self.w: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.z: D = None
        self.txt = txt

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

k = A("k")
b = B("b")
n = C("n")
m = D("m")
l = E("l")
i = F("i")
e = G("e")
d = H("d")
j = I("j")
h = J("h")

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