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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: J = None
        self.r: C = None
        self.q: F = None
        self.y: J = None
        self.x: I = None
        self.z: H = None
        self.o: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.z: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: C = None
        self.w: I = None
        self.z: C = None
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.p: B = None
        self.t: H = None
        self.s: F = None
        self.w: F = None
        self.y: F = None
        self.u: J = None
        self.r: B = None
        self.x: E = None
        self.txt = txt

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

d = A("d")
a = B("a")
m = C("m")
k = D("k")
j = E("j")
l = F("l")
f = G("f")
n = H("n")
c = I("c")
e = J("e")

d.p = f
d.y = c
a.s = j
a.o = j
a.u = e
a.y = e
a.r = m
a.q = l
a.x = c
a.z = n
m.p = l
m.z = d
k.v = n
k.z = f
k.y = f
k.p = a
k.r = c
k.w = m
j.o = d
j.p = c
l.y = d
l.v = m
l.z = m
l.w = c
l.q = k
f.s = c
n.r = k
c.q = l
c.s = l
c.w = l
c.y = l
c.p = a
c.r = a
c.t = n
c.u = e
c.x = j
e.s = d
e.r = d
e.v = l
e.w = n
e.p = c
e.t = m
e.z = m
e.o = f
assert l.y.y.r.z.r.p.txt == "
class A:
    def __init__(self, txt: str):
        self.p: G = None
        self.y: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: J = None
        self.r: C = None
        self.q: F = None
        self.y: J = None
        self.x: I = None
        self.z: H = None
        self.o: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.z: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: C = None
        self.w: I = None
        self.z: C = None
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.p: B = None
        self.t: H = None
        self.s: F = None
        self.w: F = None
        self.y: F = None
        self.u: J = None
        self.r: B = None
        self.x: E = None
        self.txt = txt

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

d = A("d")
a = B("a")
m = C("m")
k = D("k")
j = E("j")
l = F("l")
f = G("f")
n = H("n")
c = I("c")
e = J("e")

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