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

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

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

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.s: F = None
        self.u: E = None
        self.x: I = None
        self.v: A = None
        self.o: B = None
        self.w: H = None
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: G = None
        self.z: F = None
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.s: A = None
        self.r: E = None
        self.v: D = None
        self.z: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: I = None
        self.o: I = None
        self.x: D = None
        self.w: B = None
        self.s: A = None
        self.t: I = None
        self.u: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: E = None
        self.s: J = None
        self.z: I = None
        self.u: G = None
        self.t: I = None
        self.x: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: A = None
        self.r: B = None
        self.p: D = None
        self.x: A = None
        self.v: D = None
        self.w: B = None
        self.q: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: G = None
        self.r: D = None
        self.o: C = None
        self.t: A = None
        self.z: D = None
        self.u: G = None
        self.w: A = None
        self.v: G = None
        self.y: F = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.s: F = None
        self.u: E = None
        self.x: I = None
        self.v: A = None
        self.o: B = None
        self.w: H = None
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: G = None
        self.z: F = None
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.s: A = None
        self.r: E = None
        self.v: D = None
        self.z: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: I = None
        self.o: I = None
        self.x: D = None
        self.w: B = None
        self.s: A = None
        self.t: I = None
        self.u: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: E = None
        self.s: J = None
        self.z: I = None
        self.u: G = None
        self.t: I = None
        self.x: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: A = None
        self.r: B = None
        self.p: D = None
        self.x: A = None
        self.v: D = None
        self.w: B = None
        self.q: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: G = None
        self.r: D = None
        self.o: C = None
        self.t: A = None
        self.z: D = None
        self.u: G = None
        self.w: A = None
        self.v: G = None
        self.y: F = None
        self.txt = txt

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

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