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

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

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: G = None
        self.y: A = None
        self.x: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: J = None
        self.y: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: G = None
        self.y: A = None
        self.x: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: J = None
        self.y: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

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

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