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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: I = None
        self.w: E = None
        self.o: C = 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.s: C = None
        self.p: B = None
        self.z: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: J = None
        self.y: J = None
        self.o: F = None
        self.t: D = None
        self.q: F = None
        self.z: J = None
        self.x: F = None
        self.r: G = None
        self.w: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.u: C = None
        self.w: F = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: I = None
        self.w: E = None
        self.o: C = 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.s: C = None
        self.p: B = None
        self.z: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: J = None
        self.y: J = None
        self.o: F = None
        self.t: D = None
        self.q: F = None
        self.z: J = None
        self.x: F = None
        self.r: G = None
        self.w: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.u: C = None
        self.w: F = None
        self.txt = txt

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

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

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

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

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