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

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: G = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: G = None
        self.txt = txt

d = A("d")
k = B("k")
j = C("j")
c = D("c")
h = E("h")
i = F("i")
m = G("m")
g = H("g")
a = E("a")

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

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: G = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: G = None
        self.txt = txt

d = A("d")
k = B("k")
j = C("j")
c = D("c")
h = E("h")
i = F("i")
m = G("m")
g = H("g")
a = E("a")

d.o = k
d.q = m
d.p = g
d.r = j
d.v = j
d.u = a
d.z = c
k.w = g
j.u = k
j.r = m
c.u = i
c.z = m
c.r = d
c.q = j
c.y = j
c.p = k
c.w = g
h.s = a
h.p = k
i.u = j
i.v = m
i.z = m
i.t = m
i.o = k
i.s = a
i.q = d
m.v = a
m.w = i
g.p = h
g.s = m
a.s = h
a.p = k
assert h.p.w.p.p.w.s.w.s.p.txt == "k"