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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.v: B = None
        self.q: F = None
        self.z: C = None
        self.txt = txt

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

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

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

f = A("f")
d = B("d")
a = C("a")
m = D("m")
c = E("c")
h = F("h")
n = G("n")
k = H("k")
j = A("j")
e = C("e")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.v: B = None
        self.q: F = None
        self.z: C = None
        self.txt = txt

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

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

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

f = A("f")
d = B("d")
a = C("a")
m = D("m")
c = E("c")
h = F("h")
n = G("n")
k = H("k")
j = A("j")
e = C("e")

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