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

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.q: J = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: B = None
        self.s: J = None
        self.p: C = None
        self.t: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.q: J = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: B = None
        self.s: J = None
        self.p: C = None
        self.t: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

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

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

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

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

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