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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: F = None
        self.o: G = None
        self.u: A = None
        self.p: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.u: C = None
        self.y: B = None
        self.z: F = None
        self.r: I = None
        self.p: H = None
        self.txt = txt

m = A("m")
n = B("n")
j = C("j")
g = D("g")
h = E("h")
i = F("i")
f = G("f")
c = H("c")
l = I("l")
d = J("d")

m.z = g
m.v = g
m.s = c
m.q = c
m.t = l
m.u = l
m.w = i
m.p = d
m.x = d
m.o = h
n.w = j
n.r = d
j.s = i
j.z = i
j.o = f
j.u = m
j.p = c
g.u = d
g.v = d
g.q = l
g.x = l
g.r = c
g.t = n
g.w = i
g.y = i
h.z = n
i.t = h
f.v = l
f.x = l
f.s = d
c.v = n
l.y = f
l.z = f
l.u = d
l.x = c
l.t = n
d.u = j
d.y = n
d.z = i
d.r = l
d.p = c
assert n.w.s.t.z.w.s.t.txt == "
class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: D = None
        self.s: H = None
        self.t: I = None
        self.w: F = None
        self.q: H = None
        self.p: J = None
        self.o: E = None
        self.u: I = None
        self.x: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: F = None
        self.o: G = None
        self.u: A = None
        self.p: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.u: C = None
        self.y: B = None
        self.z: F = None
        self.r: I = None
        self.p: H = None
        self.txt = txt

m = A("m")
n = B("n")
j = C("j")
g = D("g")
h = E("h")
i = F("i")
f = G("f")
c = H("c")
l = I("l")
d = J("d")

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