class A:
    def __init__(self, txt: str):
        self.o: H = None
        self.v: E = None
        self.q: B = None
        self.w: E = None
        self.r: D = None
        self.s: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.q: E = None
        self.r: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.s: F = None
        self.r: F = None
        self.z: F = None
        self.u: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.q: E = None
        self.r: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.s: F = None
        self.r: F = None
        self.z: F = None
        self.u: E = None
        self.txt = txt

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

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