class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.w: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.o: H = None
        self.p: J = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: I = None
        self.w: A = None
        self.o: A = None
        self.s: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: I = None
        self.o: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: F = None
        self.w: F = None
        self.s: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: I = None
        self.t: A = None
        self.v: I = None
        self.u: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.o: H = None
        self.p: J = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: I = None
        self.w: A = None
        self.o: A = None
        self.s: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: I = None
        self.o: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: F = None
        self.w: F = None
        self.s: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: I = None
        self.t: A = None
        self.v: I = None
        self.u: D = None
        self.txt = txt

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

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