class A:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.o: H = None
        self.q: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.u: H = None
        self.y: E = None
        self.z: J = None
        self.s: B = None
        self.p: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.o: C = None
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: D = None
        self.q: B = None
        self.y: G = None
        self.v: C = None
        self.s: C = None
        self.x: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.o: H = None
        self.q: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.u: H = None
        self.y: E = None
        self.z: J = None
        self.s: B = None
        self.p: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.o: C = None
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: D = None
        self.q: B = None
        self.y: G = None
        self.v: C = None
        self.s: C = None
        self.x: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: D = None
        self.txt = txt

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

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

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