class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: G = None
        self.t: J = None
        self.w: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: G = None
        self.o: A = None
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.v: I = None
        self.s: A = None
        self.y: G = None
        self.w: J = None
        self.o: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.w: A = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.o: H = None
        self.q: I = None
        self.r: F = None
        self.v: I = None
        self.z: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: G = None
        self.o: A = None
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.v: I = None
        self.s: A = None
        self.y: G = None
        self.w: J = None
        self.o: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.w: A = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.o: H = None
        self.q: I = None
        self.r: F = None
        self.v: I = None
        self.z: C = None
        self.txt = txt

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

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