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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.q: D = None
        self.p: F = None
        self.x: F = None
        self.w: A = None
        self.u: C = None
        self.s: C = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.q: D = None
        self.p: F = None
        self.x: F = None
        self.w: A = None
        self.u: C = None
        self.s: C = None
        self.txt = txt

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

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

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

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