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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.x: F = None
        self.q: C = None
        self.s: B = None
        self.txt = txt

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

i = A("i")
m = B("m")
e = C("e")
j = D("j")
a = E("a")
d = F("d")
n = E("n")
b = D("b")
l = D("l")

i.y = d
i.v = j
i.s = m
i.z = m
i.q = a
m.t = n
e.v = n
e.w = m
e.y = i
j.u = i
j.s = e
a.u = e
a.q = e
a.x = d
a.s = m
d.s = l
n.u = e
n.q = e
n.x = d
n.s = m
b.u = i
b.s = e
l.u = i
l.s = e
assert j.s.v.x.s.txt == "
class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.v: D = None
        self.s: B = None
        self.z: B = None
        self.q: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.x: F = None
        self.q: C = None
        self.s: B = None
        self.txt = txt

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

i = A("i")
m = B("m")
e = C("e")
j = D("j")
a = E("a")
d = F("d")
n = E("n")
b = D("b")
l = D("l")

i.y = d
i.v = j
i.s = m
i.z = m
i.q = a
m.t = n
e.v = n
e.w = m
e.y = i
j.u = i
j.s = e
a.u = e
a.q = e
a.x = d
a.s = m
d.s = l
n.u = e
n.q = e
n.x = d
n.s = m
b.u = i
b.s = e
l.u = i
l.s = e
assert j.s.v.x.s.txt == "l"