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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: E = None
        self.w: E = None
        self.r: A = None
        self.s: G = None
        self.q: E = None
        self.y: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: B = None
        self.x: H = None
        self.r: B = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: E = None
        self.w: E = None
        self.r: A = None
        self.s: G = None
        self.q: E = None
        self.y: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: B = None
        self.x: H = None
        self.r: B = None
        self.txt = txt

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

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