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

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

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

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.v: G = None
        self.s: A = None
        self.p: G = None
        self.q: A = None
        self.x: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: G = None
        self.u: F = None
        self.y: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: B = None
        self.q: F = None
        self.u: E = None
        self.t: D = None
        self.w: G = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.v: G = None
        self.s: A = None
        self.p: G = None
        self.q: A = None
        self.x: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: G = None
        self.u: F = None
        self.y: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: B = None
        self.q: F = None
        self.u: E = None
        self.t: D = None
        self.w: G = None
        self.txt = txt

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

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