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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: F = None
        self.t: H = None
        self.s: E = None
        self.y: A = None
        self.u: F = None
        self.o: G = None
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: B = None
        self.q: C = None
        self.o: H = None
        self.w: F = None
        self.t: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: C = None
        self.z: B = None
        self.q: F = None
        self.u: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: H = None
        self.z: B = None
        self.x: C = None
        self.v: D = None
        self.y: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: F = None
        self.t: H = None
        self.s: E = None
        self.y: A = None
        self.u: F = None
        self.o: G = None
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: B = None
        self.q: C = None
        self.o: H = None
        self.w: F = None
        self.t: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: C = None
        self.z: B = None
        self.q: F = None
        self.u: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: H = None
        self.z: B = None
        self.x: C = None
        self.v: D = None
        self.y: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

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

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

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