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

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

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.t: D = None
        self.s: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: G = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.t: D = None
        self.s: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: G = None
        self.txt = txt

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

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

l.q = d
l.s = n
i.v = e
i.w = e
i.o = e
i.y = n
i.t = l
i.q = l
i.z = c
e.u = k
e.t = n
e.s = c
n.t = i
n.w = e
c.s = l
c.p = n
d.w = i
d.q = k
k.q = i
k.y = l
k.o = c
k.t = d
k.p = d
assert e.s.s.s.t.t.q.w.txt == "i"