class A:
    def __init__(self, txt: str):
        self.w: H = None
        self.o: H = None
        self.z: F = None
        self.s: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: D = None
        self.p: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.z: F = None
        self.q: E = None
        self.x: F = None
        self.u: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.o: H = None
        self.s: D = None
        self.y: C = None
        self.txt = txt

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

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

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

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

d = A("d")
g = B("g")
b = C("b")
a = D("a")
j = E("j")
i = F("i")
l = G("l")
h = H("h")
n = D("n")

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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: D = None
        self.p: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.z: F = None
        self.q: E = None
        self.x: F = None
        self.u: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.o: H = None
        self.s: D = None
        self.y: C = None
        self.txt = txt

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

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

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

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

d = A("d")
g = B("g")
b = C("b")
a = D("a")
j = E("j")
i = F("i")
l = G("l")
h = H("h")
n = D("n")

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