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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: I = None
        self.t: H = None
        self.z: B = None
        self.y: C = None
        self.q: I = None
        self.p: J = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: I = None
        self.r: H = None
        self.t: A = None
        self.y: I = None
        self.x: E = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: I = None
        self.t: H = None
        self.z: B = None
        self.y: C = None
        self.q: I = None
        self.p: J = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: I = None
        self.r: H = None
        self.t: A = None
        self.y: I = None
        self.x: E = None
        self.txt = txt

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

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