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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: D = None
        self.s: C = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: D = None
        self.s: C = None
        self.txt = txt

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

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

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