class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: E = None
        self.y: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.u: A = None
        self.s: E = None
        self.w: C = None
        self.r: A = None
        self.q: A = None
        self.y: G = None
        self.t: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: H = None
        self.x: H = None
        self.r: G = None
        self.t: D = None
        self.y: D = None
        self.p: A = None
        self.v: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.r: E = None
        self.q: C = None
        self.p: G = None
        self.w: G = None
        self.y: B = None
        self.o: C = None
        self.x: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: F = None
        self.x: H = None
        self.z: D = None
        self.r: C = None
        self.v: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.q: B = None
        self.z: E = None
        self.v: F = None
        self.s: A = None
        self.txt = txt

j = A("j")
i = B("i")
g = C("g")
l = D("l")
b = E("b")
f = F("f")
n = G("n")
m = H("m")

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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.u: A = None
        self.s: E = None
        self.w: C = None
        self.r: A = None
        self.q: A = None
        self.y: G = None
        self.t: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: H = None
        self.x: H = None
        self.r: G = None
        self.t: D = None
        self.y: D = None
        self.p: A = None
        self.v: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.r: E = None
        self.q: C = None
        self.p: G = None
        self.w: G = None
        self.y: B = None
        self.o: C = None
        self.x: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: F = None
        self.x: H = None
        self.z: D = None
        self.r: C = None
        self.v: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.q: B = None
        self.z: E = None
        self.v: F = None
        self.s: A = None
        self.txt = txt

j = A("j")
i = B("i")
g = C("g")
l = D("l")
b = E("b")
f = F("f")
n = G("n")
m = H("m")

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