class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.q: F = None
        self.v: F = None
        self.y: E = None
        self.x: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: E = None
        self.r: C = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: E = None
        self.s: D = None
        self.t: E = None
        self.q: A = None
        self.txt = txt

n = A("n")
l = B("l")
a = C("a")
c = D("c")
j = E("j")
k = F("k")
f = F("f")
d = C("d")
b = E("b")
h = A("h")

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: E = None
        self.r: C = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: E = None
        self.s: D = None
        self.t: E = None
        self.q: A = None
        self.txt = txt

n = A("n")
l = B("l")
a = C("a")
c = D("c")
j = E("j")
k = F("k")
f = F("f")
d = C("d")
b = E("b")
h = A("h")

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