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

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

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.t: E = None
        self.r: J = None
        self.p: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: H = None
        self.w: B = None
        self.x: I = None
        self.v: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.p: G = None
        self.t: C = None
        self.y: J = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: J = None
        self.y: J = None
        self.p: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: F = None
        self.z: I = None
        self.x: C = None
        self.q: I = None
        self.o: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.t: E = None
        self.r: J = None
        self.p: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: H = None
        self.w: B = None
        self.x: I = None
        self.v: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.p: G = None
        self.t: C = None
        self.y: J = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: J = None
        self.y: J = None
        self.p: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: F = None
        self.z: I = None
        self.x: C = None
        self.q: I = None
        self.o: B = None
        self.txt = txt

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

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