class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.w: J = None
        self.q: B = None
        self.t: C = None
        self.u: C = None
        self.y: C = None
        self.s: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: J = None
        self.z: D = None
        self.s: B = None
        self.y: F = None
        self.q: B = None
        self.o: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: I = None
        self.s: D = None
        self.t: I = None
        self.p: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.u: F = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.w: J = None
        self.q: B = None
        self.t: C = None
        self.u: C = None
        self.y: C = None
        self.s: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: J = None
        self.z: D = None
        self.s: B = None
        self.y: F = None
        self.q: B = None
        self.o: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: I = None
        self.s: D = None
        self.t: I = None
        self.p: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.u: F = None
        self.txt = txt

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

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

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