class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.o: C = None
        self.z: C = None
        self.s: D = None
        self.x: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: H = None
        self.s: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: C = None
        self.p: H = None
        self.u: E = None
        self.y: D = None
        self.x: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: A = None
        self.p: F = None
        self.x: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.txt = txt

l = A("l")
n = B("n")
m = C("m")
j = D("j")
c = E("c")
e = F("e")
b = G("b")
k = H("k")

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

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

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: H = None
        self.s: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: C = None
        self.p: H = None
        self.u: E = None
        self.y: D = None
        self.x: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: A = None
        self.p: F = None
        self.x: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.txt = txt

l = A("l")
n = B("n")
m = C("m")
j = D("j")
c = E("c")
e = F("e")
b = G("b")
k = H("k")

l.v = c
l.x = c
l.o = m
l.z = m
l.s = j
n.v = k
n.r = b
m.w = l
m.p = k
m.s = e
j.s = n
c.u = l
c.r = j
e.s = c
e.u = c
e.o = m
e.p = k
e.y = j
e.x = j
b.y = c
b.x = c
b.q = l
b.p = e
k.p = e
assert k.p.p.p.o.p.p.o.s.txt == "e"