class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: B = None
        self.p: B = None
        self.v: F = None
        self.q: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: D = None
        self.z: A = None
        self.w: F = None
        self.p: E = None
        self.y: F = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: D = None
        self.z: A = None
        self.w: F = None
        self.p: E = None
        self.y: F = None
        self.txt = txt

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

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

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