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

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

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: F = None
        self.z: B = None
        self.s: C = None
        self.w: B = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: F = None
        self.z: B = None
        self.s: C = None
        self.w: B = None
        self.txt = txt

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

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

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

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