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

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: H = None
        self.y: I = None
        self.s: I = None
        self.p: H = None
        self.r: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.x: F = None
        self.s: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: I = None
        self.s: E = None
        self.y: C = None
        self.u: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.x: G = None
        self.z: B = None
        self.p: E = None
        self.y: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: D = None
        self.p: C = None
        self.w: G = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: H = None
        self.y: I = None
        self.s: I = None
        self.p: H = None
        self.r: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.x: F = None
        self.s: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: I = None
        self.s: E = None
        self.y: C = None
        self.u: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.x: G = None
        self.z: B = None
        self.p: E = None
        self.y: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: D = None
        self.p: C = None
        self.w: G = None
        self.txt = txt

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

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

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