class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.p: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.o: H = None
        self.v: E = None
        self.y: A = None
        self.r: H = None
        self.z: F = None
        self.s: I = None
        self.p: H = None
        self.u: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: D = None
        self.r: I = None
        self.p: D = None
        self.v: G = None
        self.y: I = None
        self.z: F = None
        self.o: B = None
        self.s: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.s: H = None
        self.x: E = None
        self.p: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: H = None
        self.p: I = None
        self.x: B = None
        self.w: I = None
        self.q: E = None
        self.o: G = None
        self.y: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: E = None
        self.s: C = None
        self.z: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.o: H = None
        self.v: E = None
        self.y: A = None
        self.r: H = None
        self.z: F = None
        self.s: I = None
        self.p: H = None
        self.u: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: D = None
        self.r: I = None
        self.p: D = None
        self.v: G = None
        self.y: I = None
        self.z: F = None
        self.o: B = None
        self.s: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.s: H = None
        self.x: E = None
        self.p: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: H = None
        self.p: I = None
        self.x: B = None
        self.w: I = None
        self.q: E = None
        self.o: G = None
        self.y: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: E = None
        self.s: C = None
        self.z: F = None
        self.txt = txt

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

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