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

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.s: D = None
        self.z: C = None
        self.v: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: E = None
        self.p: F = None
        self.z: E = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.q: E = None
        self.s: A = None
        self.o: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: D = None
        self.s: G = None
        self.v: D = None
        self.w: E = None
        self.t: B = None
        self.o: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.s: D = None
        self.z: C = None
        self.v: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: E = None
        self.p: F = None
        self.z: E = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.q: E = None
        self.s: A = None
        self.o: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: D = None
        self.s: G = None
        self.v: D = None
        self.w: E = None
        self.t: B = None
        self.o: C = None
        self.txt = txt

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

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