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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.p: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.s: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.w: E = None
        self.q: C = None
        self.r: J = None
        self.u: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: C = None
        self.p: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: H = None
        self.o: H = None
        self.z: E = None
        self.x: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.p: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.s: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.w: E = None
        self.q: C = None
        self.r: J = None
        self.u: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: C = None
        self.p: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: H = None
        self.o: H = None
        self.z: E = None
        self.x: F = None
        self.txt = txt

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

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