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

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

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.u: A = None
        self.z: G = None
        self.o: C = None
        self.p: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: H = None
        self.w: D = None
        self.txt = txt

n = A("n")
i = B("i")
j = C("j")
a = D("a")
c = E("c")
f = F("f")
e = G("e")
l = H("l")
m = H("m")

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

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

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.u: A = None
        self.z: G = None
        self.o: C = None
        self.p: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: H = None
        self.w: D = None
        self.txt = txt

n = A("n")
i = B("i")
j = C("j")
a = D("a")
c = E("c")
f = F("f")
e = G("e")
l = H("l")
m = H("m")

n.x = a
n.s = a
n.t = e
n.p = m
n.y = c
i.u = j
i.v = j
i.x = e
i.y = e
i.t = e
i.r = l
i.z = f
j.u = m
a.o = e
a.v = e
a.x = n
a.u = n
a.s = f
a.r = f
c.z = e
f.r = e
f.z = e
f.u = n
f.o = j
f.p = j
e.s = i
e.p = i
l.t = a
l.w = a
l.v = m
m.t = a
m.w = a
m.v = l
assert j.u.v.t.r.u.y.z.p.r.txt == "l"