class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: C = None
        self.w: D = None
        self.t: F = None
        self.r: C = None
        self.v: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.o: F = None
        self.z: E = None
        self.w: F = None
        self.x: E = None
        self.u: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.y: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.w: F = None
        self.u: C = None
        self.y: F = None
        self.v: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: B = None
        self.t: A = None
        self.o: A = None
        self.v: C = None
        self.s: E = None
        self.txt = txt

n = A("n")
k = B("k")
h = C("h")
l = D("l")
j = E("j")
i = F("i")
f = F("f")

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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.o: F = None
        self.z: E = None
        self.w: F = None
        self.x: E = None
        self.u: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.y: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.w: F = None
        self.u: C = None
        self.y: F = None
        self.v: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: B = None
        self.t: A = None
        self.o: A = None
        self.v: C = None
        self.s: E = None
        self.txt = txt

n = A("n")
k = B("k")
h = C("h")
l = D("l")
j = E("j")
i = F("i")
f = F("f")

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