class A:
    def __init__(self, txt: str):
        self.u: J = None
        self.r: D = None
        self.y: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.u: B = None
        self.t: J = None
        self.v: E = None
        self.p: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: F = None
        self.v: J = None
        self.r: F = None
        self.y: B = None
        self.x: J = None
        self.z: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: I = None
        self.o: G = None
        self.y: J = None
        self.z: I = None
        self.w: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: F = None
        self.r: F = None
        self.w: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.u: B = None
        self.t: J = None
        self.v: E = None
        self.p: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: F = None
        self.v: J = None
        self.r: F = None
        self.y: B = None
        self.x: J = None
        self.z: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: I = None
        self.o: G = None
        self.y: J = None
        self.z: I = None
        self.w: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: F = None
        self.r: F = None
        self.w: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

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

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