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

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.u: H = None
        self.z: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.r: J = None
        self.y: C = None
        self.z: J = None
        self.p: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: J = None
        self.x: E = None
        self.r: B = None
        self.o: A = None
        self.s: B = None
        self.q: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: C = None
        self.s: I = None
        self.t: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.u: H = None
        self.z: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.r: J = None
        self.y: C = None
        self.z: J = None
        self.p: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: J = None
        self.x: E = None
        self.r: B = None
        self.o: A = None
        self.s: B = None
        self.q: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: C = None
        self.s: I = None
        self.t: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

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

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