class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.v: B = None
        self.z: D = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: G = None
        self.y: F = None
        self.q: A = None
        self.w: E = None
        self.v: F = None
        self.x: G = None
        self.o: C = None
        self.txt = txt

d = A("d")
f = B("f")
i = C("i")
a = D("a")
h = E("h")
e = F("e")
l = G("l")
c = H("c")
m = G("m")

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

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

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.v: B = None
        self.z: D = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: G = None
        self.y: F = None
        self.q: A = None
        self.w: E = None
        self.v: F = None
        self.x: G = None
        self.o: C = None
        self.txt = txt

d = A("d")
f = B("f")
i = C("i")
a = D("a")
h = E("h")
e = F("e")
l = G("l")
c = H("c")
m = G("m")

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