class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.q: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: J = None
        self.p: D = None
        self.r: G = None
        self.z: I = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: E = None
        self.s: C = None
        self.y: G = None
        self.t: G = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.p: H = None
        self.w: D = None
        self.y: E = None
        self.s: G = None
        self.q: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: J = None
        self.p: D = None
        self.r: G = None
        self.z: I = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: E = None
        self.s: C = None
        self.y: G = None
        self.t: G = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.p: H = None
        self.w: D = None
        self.y: E = None
        self.s: G = None
        self.q: F = None
        self.txt = txt

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

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