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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: C = None
        self.x: B = None
        self.u: B = None
        self.r: E = None
        self.q: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: F = None
        self.x: A = None
        self.z: B = None
        self.r: A = None
        self.v: C = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: C = None
        self.x: B = None
        self.u: B = None
        self.r: E = None
        self.q: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: F = None
        self.x: A = None
        self.z: B = None
        self.r: A = None
        self.v: C = None
        self.txt = txt

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

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

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

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

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