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

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

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.u: H = None
        self.x: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.t: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: B = None
        self.p: D = None
        self.x: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: I = None
        self.r: I = None
        self.y: G = None
        self.o: H = None
        self.s: H = None
        self.z: A = None
        self.u: J = None
        self.v: D = None
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.u: H = None
        self.x: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.t: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: B = None
        self.p: D = None
        self.x: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: I = None
        self.r: I = None
        self.y: G = None
        self.o: H = None
        self.s: H = None
        self.z: A = None
        self.u: J = None
        self.v: D = None
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

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

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

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

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

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