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

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: G = None
        self.o: G = None
        self.z: G = None
        self.u: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: I = None
        self.z: J = None
        self.t: A = None
        self.u: F = None
        self.r: D = None
        self.x: C = None
        self.w: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.v: A = None
        self.y: B = None
        self.s: C = None
        self.u: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.s: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.x: A = None
        self.o: A = None
        self.t: E = None
        self.p: B = None
        self.w: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: D = None
        self.w: D = None
        self.z: A = None
        self.q: C = None
        self.s: D = None
        self.r: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: F = None
        self.w: G = None
        self.t: H = None
        self.y: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: G = None
        self.o: G = None
        self.z: G = None
        self.u: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: I = None
        self.z: J = None
        self.t: A = None
        self.u: F = None
        self.r: D = None
        self.x: C = None
        self.w: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.v: A = None
        self.y: B = None
        self.s: C = None
        self.u: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.s: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.x: A = None
        self.o: A = None
        self.t: E = None
        self.p: B = None
        self.w: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: D = None
        self.w: D = None
        self.z: A = None
        self.q: C = None
        self.s: D = None
        self.r: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: F = None
        self.w: G = None
        self.t: H = None
        self.y: H = None
        self.txt = txt

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

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