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

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

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

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

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

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

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

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

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

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

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

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

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

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

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