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

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: D = None
        self.w: B = None
        self.y: I = None
        self.q: G = None
        self.x: F = None
        self.t: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: I = None
        self.v: F = None
        self.w: H = None
        self.r: I = None
        self.q: G = None
        self.p: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: B = None
        self.t: D = None
        self.z: H = None
        self.o: A = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.t: I = None
        self.v: D = None
        self.r: I = None
        self.s: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: D = None
        self.w: B = None
        self.y: I = None
        self.q: G = None
        self.x: F = None
        self.t: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: I = None
        self.v: F = None
        self.w: H = None
        self.r: I = None
        self.q: G = None
        self.p: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: B = None
        self.t: D = None
        self.z: H = None
        self.o: A = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.t: I = None
        self.v: D = None
        self.r: I = None
        self.s: B = None
        self.txt = txt

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

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