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

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

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.p: E = None
        self.o: A = None
        self.u: E = None
        self.q: F = None
        self.t: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: A = None
        self.u: A = None
        self.z: B = None
        self.t: E = None
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.p: E = None
        self.o: A = None
        self.u: E = None
        self.q: F = None
        self.t: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: A = None
        self.u: A = None
        self.z: B = None
        self.t: E = None
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

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

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

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