class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.s: B = None
        self.o: B = None
        self.r: F = None
        self.w: D = None
        self.u: F = None
        self.z: B = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.o: C = None
        self.u: A = None
        self.z: A = None
        self.txt = txt

h = A("h")
j = B("j")
f = C("f")
i = D("i")
a = E("a")
d = F("d")
n = G("n")
l = E("l")
m = B("m")

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.o: C = None
        self.u: A = None
        self.z: A = None
        self.txt = txt

h = A("h")
j = B("j")
f = C("f")
i = D("i")
a = E("a")
d = F("d")
n = G("n")
l = E("l")
m = B("m")

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