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

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

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.y: E = None
        self.u: F = None
        self.w: E = None
        self.r: E = None
        self.q: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.q: B = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.y: E = None
        self.u: F = None
        self.w: E = None
        self.r: E = None
        self.q: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.q: B = None
        self.txt = txt

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

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

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