class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: E = None
        self.t: I = None
        self.s: D = None
        self.u: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.u: D = None
        self.p: H = None
        self.t: I = None
        self.x: I = None
        self.z: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.v: C = None
        self.s: H = None
        self.t: C = None
        self.z: F = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.w: A = None
        self.p: I = None
        self.q: I = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.u: D = None
        self.p: H = None
        self.t: I = None
        self.x: I = None
        self.z: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.v: C = None
        self.s: H = None
        self.t: C = None
        self.z: F = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.w: A = None
        self.p: I = None
        self.q: I = None
        self.txt = txt

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

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

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