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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: J = None
        self.s: G = None
        self.u: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.v: A = None
        self.r: I = None
        self.w: B = None
        self.y: A = None
        self.p: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.t: J = None
        self.z: A = None
        self.u: B = None
        self.r: E = None
        self.w: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: E = None
        self.w: F = None
        self.p: B = None
        self.u: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: J = None
        self.s: G = None
        self.u: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.v: A = None
        self.r: I = None
        self.w: B = None
        self.y: A = None
        self.p: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.t: J = None
        self.z: A = None
        self.u: B = None
        self.r: E = None
        self.w: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: E = None
        self.w: F = None
        self.p: B = None
        self.u: D = None
        self.txt = txt

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

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