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

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

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.q: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: J = None
        self.w: J = None
        self.t: G = None
        self.z: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: H = None
        self.p: B = None
        self.z: I = None
        self.y: G = None
        self.x: B = None
        self.w: D = None
        self.v: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: B = None
        self.u: J = None
        self.o: C = None
        self.x: J = None
        self.s: C = None
        self.t: E = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.q: A = None
        self.x: A = None
        self.p: I = None
        self.o: E = None
        self.v: F = None
        self.w: H = None
        self.z: H = None
        self.u: E = None
        self.s: I = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.q: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: J = None
        self.w: J = None
        self.t: G = None
        self.z: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: H = None
        self.p: B = None
        self.z: I = None
        self.y: G = None
        self.x: B = None
        self.w: D = None
        self.v: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: B = None
        self.u: J = None
        self.o: C = None
        self.x: J = None
        self.s: C = None
        self.t: E = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.q: A = None
        self.x: A = None
        self.p: I = None
        self.o: E = None
        self.v: F = None
        self.w: H = None
        self.z: H = None
        self.u: E = None
        self.s: I = None
        self.txt = txt

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

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