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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: J = None
        self.s: D = None
        self.r: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: I = None
        self.u: J = None
        self.p: D = None
        self.v: E = None
        self.z: G = None
        self.t: C = None
        self.w: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.y: J = None
        self.o: F = None
        self.t: A = None
        self.x: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: G = None
        self.w: D = None
        self.v: G = None
        self.r: C = None
        self.o: H = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: J = None
        self.s: D = None
        self.r: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: I = None
        self.u: J = None
        self.p: D = None
        self.v: E = None
        self.z: G = None
        self.t: C = None
        self.w: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.y: J = None
        self.o: F = None
        self.t: A = None
        self.x: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: G = None
        self.w: D = None
        self.v: G = None
        self.r: C = None
        self.o: H = None
        self.txt = txt

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

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

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