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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: H = None
        self.r: G = None
        self.t: E = None
        self.o: A = None
        self.y: A = None
        self.w: D = None
        self.s: J = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.y: D = None
        self.o: C = None
        self.s: H = None
        self.z: F = None
        self.q: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.r: B = None
        self.z: J = None
        self.u: E = None
        self.y: G = None
        self.v: D = None
        self.t: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.v: E = None
        self.u: H = None
        self.q: F = None
        self.p: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: H = None
        self.q: C = None
        self.s: A = None
        self.x: D = None
        self.txt = txt

f = A("f")
i = B("i")
j = C("j")
l = D("l")
e = E("e")
m = F("m")
a = G("a")
c = H("c")
h = I("h")
b = J("b")

f.p = l
i.q = f
i.o = f
i.y = f
i.z = c
i.r = a
i.t = e
i.w = l
i.s = b
j.z = l
j.p = l
j.s = i
j.t = i
j.y = f
j.u = c
j.r = c
j.o = e
l.w = i
l.v = i
l.t = i
l.s = e
l.u = b
l.q = a
l.r = f
l.y = f
l.z = c
e.r = a
e.u = a
e.v = c
e.o = l
e.w = l
e.x = l
e.s = i
e.y = i
e.z = j
e.p = b
m.q = a
a.t = c
a.s = c
a.y = l
a.q = l
a.o = j
a.z = m
c.o = f
c.r = i
c.z = b
c.u = e
c.y = a
c.v = l
c.t = h
h.x = a
h.v = e
h.u = c
h.q = m
h.p = j
b.t = l
b.x = l
b.r = c
b.q = j
b.s = f
assert m.q.y.y.p.s.u.y.y.p.txt == "
class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: H = None
        self.r: G = None
        self.t: E = None
        self.o: A = None
        self.y: A = None
        self.w: D = None
        self.s: J = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.y: D = None
        self.o: C = None
        self.s: H = None
        self.z: F = None
        self.q: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.r: B = None
        self.z: J = None
        self.u: E = None
        self.y: G = None
        self.v: D = None
        self.t: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.v: E = None
        self.u: H = None
        self.q: F = None
        self.p: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: H = None
        self.q: C = None
        self.s: A = None
        self.x: D = None
        self.txt = txt

f = A("f")
i = B("i")
j = C("j")
l = D("l")
e = E("e")
m = F("m")
a = G("a")
c = H("c")
h = I("h")
b = J("b")

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