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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.z: E = None
        self.w: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: E = None
        self.p: B = None
        self.o: B = None
        self.t: E = None
        self.txt = txt

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

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

d = A("d")
g = B("g")
a = C("a")
c = D("c")
m = E("m")
h = F("h")
n = C("n")
k = D("k")
b = B("b")
j = C("j")

d.v = m
d.z = g
d.r = h
d.s = a
g.o = m
g.z = m
g.w = k
a.p = d
a.z = d
a.t = c
c.x = k
c.w = m
c.t = m
c.p = g
c.o = b
m.o = k
m.w = h
m.s = g
m.x = a
h.z = c
h.o = k
h.x = m
h.p = g
h.w = n
h.u = b
n.p = d
n.z = d
n.t = k
k.x = c
k.w = m
k.t = m
k.p = b
k.o = b
b.o = m
b.z = m
b.w = c
j.p = d
j.z = d
j.t = k
assert g.z.o.x.w.w.u.w.x.w.o.txt == "
class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: B = None
        self.r: F = None
        self.s: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.z: E = None
        self.w: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: E = None
        self.p: B = None
        self.o: B = None
        self.t: E = None
        self.txt = txt

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

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

d = A("d")
g = B("g")
a = C("a")
c = D("c")
m = E("m")
h = F("h")
n = C("n")
k = D("k")
b = B("b")
j = C("j")

d.v = m
d.z = g
d.r = h
d.s = a
g.o = m
g.z = m
g.w = k
a.p = d
a.z = d
a.t = c
c.x = k
c.w = m
c.t = m
c.p = g
c.o = b
m.o = k
m.w = h
m.s = g
m.x = a
h.z = c
h.o = k
h.x = m
h.p = g
h.w = n
h.u = b
n.p = d
n.z = d
n.t = k
k.x = c
k.w = m
k.t = m
k.p = b
k.o = b
b.o = m
b.z = m
b.w = c
j.p = d
j.z = d
j.t = k
assert g.z.o.x.w.w.u.w.x.w.o.txt == "k"