class A:
    def __init__(self, txt: str):
        self.x: I = None
        self.s: D = None
        self.t: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: H = None
        self.u: C = None
        self.x: H = None
        self.t: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: C = None
        self.p: H = None
        self.y: C = None
        self.o: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: B = None
        self.y: A = None
        self.o: G = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: H = None
        self.u: C = None
        self.x: H = None
        self.t: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: C = None
        self.p: H = None
        self.y: C = None
        self.o: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: B = None
        self.y: A = None
        self.o: G = None
        self.txt = txt

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

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

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