class A:
    def __init__(self, txt: str):
        self.v: J = None
        self.w: H = None
        self.x: H = None
        self.o: I = None
        self.u: B = None
        self.s: J = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: C = None
        self.y: A = None
        self.u: C = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: C = None
        self.y: A = None
        self.u: C = None
        self.txt = txt

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

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

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

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

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

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

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

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