class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.q: D = None
        self.o: G = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.z: A = None
        self.t: A = None
        self.y: H = None
        self.u: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.r: A = None
        self.w: C = None
        self.p: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: A = None
        self.q: C = None
        self.u: C = None
        self.r: A = None
        self.v: A = None
        self.t: A = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.z: A = None
        self.t: A = None
        self.y: H = None
        self.u: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.r: A = None
        self.w: C = None
        self.p: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: A = None
        self.q: C = None
        self.u: C = None
        self.r: A = None
        self.v: A = None
        self.t: A = None
        self.txt = txt

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

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