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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: F = None
        self.v: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: D = None
        self.x: E = None
        self.o: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: F = None
        self.v: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: D = None
        self.x: E = None
        self.o: E = None
        self.txt = txt

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

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