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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: A = None
        self.s: B = None
        self.r: C = None
        self.p: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: E = None
        self.q: E = None
        self.w: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.p: A = None
        self.y: G = None
        self.q: G = None
        self.o: F = None
        self.v: A = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: A = None
        self.s: B = None
        self.r: C = None
        self.p: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: E = None
        self.q: E = None
        self.w: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.p: A = None
        self.y: G = None
        self.q: G = None
        self.o: F = None
        self.v: A = None
        self.txt = txt

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

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