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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: E = None
        self.y: E = None
        self.t: H = None
        self.v: H = None
        self.q: A = None
        self.z: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: C = None
        self.y: A = None
        self.txt = txt

j = A("j")
g = B("g")
e = C("e")
k = D("k")
f = E("f")
d = F("d")
h = G("h")
l = H("l")
m = E("m")

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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: E = None
        self.y: E = None
        self.t: H = None
        self.v: H = None
        self.q: A = None
        self.z: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: C = None
        self.y: A = None
        self.txt = txt

j = A("j")
g = B("g")
e = C("e")
k = D("k")
f = E("f")
d = F("d")
h = G("h")
l = H("l")
m = E("m")

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