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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.t: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: I = None
        self.q: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.o: E = None
        self.y: J = None
        self.r: F = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.t: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: I = None
        self.q: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.o: E = None
        self.y: J = None
        self.r: F = None
        self.txt = txt

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

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

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

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