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

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

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: D = None
        self.y: G = None
        self.r: H = None
        self.s: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: D = None
        self.w: B = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: D = None
        self.y: G = None
        self.r: H = None
        self.s: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: D = None
        self.w: B = None
        self.txt = txt

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

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

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

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

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