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

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: C = None
        self.w: F = None
        self.r: F = None
        self.s: E = None
        self.x: C = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: A = None
        self.q: C = None
        self.t: C = None
        self.x: C = None
        self.z: F = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: C = None
        self.w: F = None
        self.r: F = None
        self.s: E = None
        self.x: C = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: A = None
        self.q: C = None
        self.t: C = None
        self.x: C = None
        self.z: F = None
        self.txt = txt

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

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

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