class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: D = None
        self.q: G = None
        self.o: C = None
        self.z: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.o: D = None
        self.r: A = None
        self.q: F = None
        self.z: F = None
        self.u: G = None
        self.v: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.u: D = None
        self.s: A = None
        self.o: H = None
        self.q: D = None
        self.v: D = None
        self.y: E = None
        self.r: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.o: D = None
        self.r: A = None
        self.q: F = None
        self.z: F = None
        self.u: G = None
        self.v: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.u: D = None
        self.s: A = None
        self.o: H = None
        self.q: D = None
        self.v: D = None
        self.y: E = None
        self.r: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

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

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