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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: I = None
        self.r: I = None
        self.x: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: I = None
        self.o: B = None
        self.r: A = None
        self.t: H = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: A = None
        self.x: B = None
        self.t: I = None
        self.r: B = None
        self.v: D = None
        self.q: C = None
        self.p: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: G = None
        self.z: E = None
        self.u: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: I = None
        self.r: I = None
        self.x: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: I = None
        self.o: B = None
        self.r: A = None
        self.t: H = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: A = None
        self.x: B = None
        self.t: I = None
        self.r: B = None
        self.v: D = None
        self.q: C = None
        self.p: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: G = None
        self.z: E = None
        self.u: A = None
        self.txt = txt

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

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