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

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

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: D = None
        self.r: F = None
        self.v: B = None
        self.q: F = None
        self.o: A = None
        self.u: B = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: H = None
        self.s: C = None
        self.r: B = None
        self.t: B = None
        self.z: C = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: D = None
        self.r: F = None
        self.v: B = None
        self.q: F = None
        self.o: A = None
        self.u: B = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: H = None
        self.s: C = None
        self.r: B = None
        self.t: B = None
        self.z: C = None
        self.txt = txt

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

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

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