class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: A = None
        self.z: A = None
        self.r: B = None
        self.t: A = None
        self.q: C = None
        self.txt = txt

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

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

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

k = A("k")
b = B("b")
m = C("m")
e = D("e")
i = E("i")
l = F("l")
h = E("h")
n = C("n")
c = A("c")
j = F("j")

k.q = l
b.u = e
b.t = h
b.w = h
b.z = i
b.v = j
m.y = k
m.z = k
m.t = k
m.v = c
m.r = b
m.q = n
e.u = b
i.v = l
i.t = h
l.y = j
l.v = c
l.s = n
l.t = i
l.o = e
l.u = b
h.v = l
h.t = i
n.y = k
n.v = k
n.t = k
n.z = c
n.r = b
n.q = m
c.q = j
j.y = l
j.v = k
j.s = m
j.t = h
j.o = e
j.u = b
assert n.z.q.t.v.t.txt == "
class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: A = None
        self.z: A = None
        self.r: B = None
        self.t: A = None
        self.q: C = None
        self.txt = txt

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

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

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

k = A("k")
b = B("b")
m = C("m")
e = D("e")
i = E("i")
l = F("l")
h = E("h")
n = C("n")
c = A("c")
j = F("j")

k.q = l
b.u = e
b.t = h
b.w = h
b.z = i
b.v = j
m.y = k
m.z = k
m.t = k
m.v = c
m.r = b
m.q = n
e.u = b
i.v = l
i.t = h
l.y = j
l.v = c
l.s = n
l.t = i
l.o = e
l.u = b
h.v = l
h.t = i
n.y = k
n.v = k
n.t = k
n.z = c
n.r = b
n.q = m
c.q = j
j.y = l
j.v = k
j.s = m
j.t = h
j.o = e
j.u = b
assert n.z.q.t.v.t.txt == "i"