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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: F = None
        self.w: I = None
        self.v: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.y: G = None
        self.p: J = None
        self.o: I = None
        self.v: E = None
        self.w: B = None
        self.z: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: I = None
        self.s: A = None
        self.t: I = None
        self.u: G = None
        self.x: G = None
        self.w: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: J = None
        self.u: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: J = None
        self.s: C = None
        self.o: J = None
        self.p: B = None
        self.y: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: H = None
        self.u: C = None
        self.t: A = None
        self.v: F = None
        self.r: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: F = None
        self.w: I = None
        self.v: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.y: G = None
        self.p: J = None
        self.o: I = None
        self.v: E = None
        self.w: B = None
        self.z: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: I = None
        self.s: A = None
        self.t: I = None
        self.u: G = None
        self.x: G = None
        self.w: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: J = None
        self.u: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: J = None
        self.s: C = None
        self.o: J = None
        self.p: B = None
        self.y: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: H = None
        self.u: C = None
        self.t: A = None
        self.v: F = None
        self.r: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

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

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