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

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

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

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: B = None
        self.p: A = None
        self.u: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.s: D = None
        self.y: F = None
        self.t: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.t: H = None
        self.w: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: H = None
        self.q: G = None
        self.txt = txt

j = A("j")
b = B("b")
e = C("e")
m = D("m")
c = E("c")
f = F("f")
n = G("n")
i = H("i")
d = H("d")

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: B = None
        self.p: A = None
        self.u: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.s: D = None
        self.y: F = None
        self.t: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.t: H = None
        self.w: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: H = None
        self.q: G = None
        self.txt = txt

j = A("j")
b = B("b")
e = C("e")
m = D("m")
c = E("c")
f = F("f")
n = G("n")
i = H("i")
d = H("d")

j.q = e
j.t = e
j.s = e
j.o = e
j.p = i
j.w = b
b.s = f
b.p = f
b.x = e
b.u = e
b.o = m
b.w = d
b.q = c
b.v = n
e.o = m
e.y = d
m.r = j
m.p = j
m.z = b
m.u = i
c.v = f
c.y = f
c.s = m
c.t = j
f.o = c
f.q = i
n.q = d
n.t = i
n.w = j
i.t = f
i.w = d
i.q = n
d.t = f
d.w = i
d.q = n
assert d.w.w.q.t.t.o.v.q.txt == "i"