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

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

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

class D:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: C = None
        self.o: H = None
        self.z: G = None
        self.u: G = None
        self.p: C = None
        self.w: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.o: D = None
        self.u: A = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: C = None
        self.o: H = None
        self.z: G = None
        self.u: G = None
        self.p: C = None
        self.w: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.o: D = None
        self.u: A = None
        self.txt = txt

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

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

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

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