class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.x: H = None
        self.z: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: I = None
        self.u: H = None
        self.t: E = None
        self.z: J = None
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.v: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.v: A = None
        self.s: B = None
        self.t: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: D = None
        self.v: E = None
        self.p: E = None
        self.o: I = None
        self.x: F = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: B = None
        self.o: D = None
        self.u: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: I = None
        self.u: H = None
        self.t: E = None
        self.z: J = None
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.v: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.v: A = None
        self.s: B = None
        self.t: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: D = None
        self.v: E = None
        self.p: E = None
        self.o: I = None
        self.x: F = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: B = None
        self.o: D = None
        self.u: C = None
        self.txt = txt

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

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