class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: J = None
        self.z: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: C = None
        self.r: A = None
        self.y: I = None
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.q: I = None
        self.w: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: J = None
        self.r: E = None
        self.t: D = None
        self.txt = txt

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

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

b = A("b")
k = B("k")
d = C("d")
h = D("h")
m = E("m")
f = F("f")
g = G("g")
a = H("a")
c = I("c")
i = J("i")

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: C = None
        self.r: A = None
        self.y: I = None
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.q: I = None
        self.w: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: J = None
        self.r: E = None
        self.t: D = None
        self.txt = txt

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

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

b = A("b")
k = B("k")
d = C("d")
h = D("h")
m = E("m")
f = F("f")
g = G("g")
a = H("a")
c = I("c")
i = J("i")

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