class A:
    def __init__(self, txt: str):
        self.o: G = None
        self.v: B = None
        self.p: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: E = None
        self.y: E = None
        self.u: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

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

j = A("j")
l = B("l")
g = C("g")
a = D("a")
n = E("n")
h = F("h")
f = G("f")
d = H("d")
c = C("c")
e = E("e")

j.o = f
j.p = f
j.v = l
l.r = n
l.p = f
l.s = a
l.u = h
l.t = g
g.o = f
g.x = j
g.y = j
g.v = a
g.w = d
a.u = l
a.s = j
n.p = j
n.q = h
n.v = c
n.o = a
n.u = g
h.o = l
h.u = l
h.r = e
h.y = e
f.r = l
d.t = c
d.y = l
d.u = j
d.s = g
c.o = f
c.x = j
c.y = j
c.v = a
c.w = d
e.p = j
e.q = h
e.v = c
e.o = a
e.u = g
assert g.v.s.p.r.p.r.s.s.txt == "
class A:
    def __init__(self, txt: str):
        self.o: G = None
        self.v: B = None
        self.p: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: E = None
        self.y: E = None
        self.u: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

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

j = A("j")
l = B("l")
g = C("g")
a = D("a")
n = E("n")
h = F("h")
f = G("f")
d = H("d")
c = C("c")
e = E("e")

j.o = f
j.p = f
j.v = l
l.r = n
l.p = f
l.s = a
l.u = h
l.t = g
g.o = f
g.x = j
g.y = j
g.v = a
g.w = d
a.u = l
a.s = j
n.p = j
n.q = h
n.v = c
n.o = a
n.u = g
h.o = l
h.u = l
h.r = e
h.y = e
f.r = l
d.t = c
d.y = l
d.u = j
d.s = g
c.o = f
c.x = j
c.y = j
c.v = a
c.w = d
e.p = j
e.q = h
e.v = c
e.o = a
e.u = g
assert g.v.s.p.r.p.r.s.s.txt == "j"