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

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

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.q: H = None
        self.y: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.x: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.r: A = None
        self.x: B = None
        self.s: B = None
        self.w: A = None
        self.z: G = None
        self.p: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: C = None
        self.p: E = None
        self.u: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.q: H = None
        self.y: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.x: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.r: A = None
        self.x: B = None
        self.s: B = None
        self.w: A = None
        self.z: G = None
        self.p: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: C = None
        self.p: E = None
        self.u: D = None
        self.txt = txt

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

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