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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: C = None
        self.t: H = None
        self.q: H = None
        self.s: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.q: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: G = None
        self.s: G = None
        self.o: D = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: C = None
        self.t: H = None
        self.q: H = None
        self.s: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.q: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: G = None
        self.s: G = None
        self.o: D = None
        self.txt = txt

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

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

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

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