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

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

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

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.s: B = None
        self.y: A = None
        self.o: E = None
        self.z: G = None
        self.r: B = None
        self.w: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: E = None
        self.p: D = None
        self.q: B = None
        self.v: F = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.s: B = None
        self.y: A = None
        self.o: E = None
        self.z: G = None
        self.r: B = None
        self.w: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: E = None
        self.p: D = None
        self.q: B = None
        self.v: F = None
        self.txt = txt

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

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

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