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

class B:
    def __init__(self, txt: str):
        self.r: I = None
        self.u: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: I = None
        self.w: A = None
        self.o: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.v: B = None
        self.x: I = None
        self.o: B = None
        self.q: G = None
        self.p: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: B = None
        self.v: F = None
        self.u: C = None
        self.r: F = None
        self.p: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: I = None
        self.u: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: I = None
        self.w: A = None
        self.o: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.v: B = None
        self.x: I = None
        self.o: B = None
        self.q: G = None
        self.p: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: B = None
        self.v: F = None
        self.u: C = None
        self.r: F = None
        self.p: E = None
        self.txt = txt

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

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