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

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

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

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: C = None
        self.p: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: I = None
        self.v: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: I = None
        self.z: C = None
        self.v: D = None
        self.y: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: C = None
        self.p: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: I = None
        self.v: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: I = None
        self.z: C = None
        self.v: D = None
        self.y: B = None
        self.txt = txt

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

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