class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.u: E = None
        self.t: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: H = None
        self.t: F = None
        self.w: A = None
        self.s: A = None
        self.x: F = None
        self.r: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: H = None
        self.w: H = None
        self.v: E = None
        self.x: E = None
        self.t: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.v: C = None
        self.t: B = None
        self.s: C = None
        self.p: E = None
        self.q: B = None
        self.w: G = None
        self.z: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.p: D = None
        self.w: A = None
        self.z: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: H = None
        self.t: F = None
        self.w: A = None
        self.s: A = None
        self.x: F = None
        self.r: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: H = None
        self.w: H = None
        self.v: E = None
        self.x: E = None
        self.t: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.v: C = None
        self.t: B = None
        self.s: C = None
        self.p: E = None
        self.q: B = None
        self.w: G = None
        self.z: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.p: D = None
        self.w: A = None
        self.z: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

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