class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: C = None
        self.t: B = None
        self.y: D = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: C = None
        self.t: B = None
        self.y: D = None
        self.txt = txt

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

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

k.v = n
n.v = l
n.r = e
n.y = k
n.x = k
n.q = k
n.w = m
b.w = i
b.q = l
b.t = k
b.r = k
b.p = c
c.y = e
e.q = b
e.w = b
e.t = n
e.y = l
m.s = c
m.u = c
m.t = n
m.p = n
m.r = k
l.y = e
i.v = l
i.r = e
i.y = k
i.x = k
i.q = k
i.w = m
assert n.w.t.q.v.v.y.txt == "e"