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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.w: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.p: G = None
        self.q: G = None
        self.t: B = None
        self.o: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: I = None
        self.r: C = None
        self.v: E = None
        self.y: B = None
        self.z: F = None
        self.q: F = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.w: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.p: G = None
        self.q: G = None
        self.t: B = None
        self.o: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: I = None
        self.r: C = None
        self.v: E = None
        self.y: B = None
        self.z: F = None
        self.q: F = None
        self.txt = txt

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

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