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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.x: C = None
        self.t: G = None
        self.y: C = None
        self.u: A = None
        self.q: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: E = None
        self.p: D = None
        self.s: B = None
        self.v: G = None
        self.r: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.v: G = None
        self.z: H = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.x: C = None
        self.t: G = None
        self.y: C = None
        self.u: A = None
        self.q: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: E = None
        self.p: D = None
        self.s: B = None
        self.v: G = None
        self.r: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.v: G = None
        self.z: H = None
        self.txt = txt

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

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

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

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

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