class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: C = None
        self.t: J = None
        self.p: J = None
        self.u: C = None
        self.x: E = None
        self.z: D = None
        self.r: J = None
        self.s: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: F = None
        self.r: D = None
        self.s: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: E = None
        self.s: G = None
        self.txt = txt

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

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: F = None
        self.r: D = None
        self.s: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: E = None
        self.s: G = None
        self.txt = txt

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

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

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

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

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

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

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

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