class A:
    def __init__(self, txt: str):
        self.o: G = None
        self.x: G = None
        self.s: J = None
        self.z: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.z: F = None
        self.t: H = None
        self.r: J = None
        self.o: J = None
        self.y: I = None
        self.s: H = None
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.s: F = None
        self.w: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.w: F = None
        self.v: A = None
        self.u: H = None
        self.p: I = None
        self.r: C = None
        self.z: H = None
        self.t: J = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.u: I = None
        self.z: B = None
        self.o: I = None
        self.t: E = None
        self.r: E = None
        self.q: D = None
        self.w: G = None
        self.v: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: B = None
        self.w: E = None
        self.t: B = None
        self.p: I = None
        self.o: A = None
        self.z: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.z: F = None
        self.t: H = None
        self.r: J = None
        self.o: J = None
        self.y: I = None
        self.s: H = None
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.s: F = None
        self.w: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.w: F = None
        self.v: A = None
        self.u: H = None
        self.p: I = None
        self.r: C = None
        self.z: H = None
        self.t: J = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.u: I = None
        self.z: B = None
        self.o: I = None
        self.t: E = None
        self.r: E = None
        self.q: D = None
        self.w: G = None
        self.v: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: B = None
        self.w: E = None
        self.t: B = None
        self.p: I = None
        self.o: A = None
        self.z: C = None
        self.txt = txt

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

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