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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.x: H = None
        self.u: A = None
        self.o: E = None
        self.w: C = None
        self.s: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: E = None
        self.t: G = None
        self.q: D = None
        self.s: E = None
        self.y: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.s: C = None
        self.z: D = None
        self.t: A = None
        self.w: F = None
        self.r: G = None
        self.u: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.u: E = None
        self.v: H = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.x: H = None
        self.u: A = None
        self.o: E = None
        self.w: C = None
        self.s: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: E = None
        self.t: G = None
        self.q: D = None
        self.s: E = None
        self.y: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.s: C = None
        self.z: D = None
        self.t: A = None
        self.w: F = None
        self.r: G = None
        self.u: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.u: E = None
        self.v: H = None
        self.txt = txt

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

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

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

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