class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.v: J = None
        self.u: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.y: G = None
        self.x: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: I = None
        self.o: B = None
        self.s: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: J = None
        self.y: D = None
        self.x: E = None
        self.v: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: I = None
        self.t: C = None
        self.w: H = None
        self.u: J = None
        self.x: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: J = None
        self.x: E = None
        self.p: J = None
        self.w: J = None
        self.y: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.y: G = None
        self.x: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: I = None
        self.o: B = None
        self.s: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: J = None
        self.y: D = None
        self.x: E = None
        self.v: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: I = None
        self.t: C = None
        self.w: H = None
        self.u: J = None
        self.x: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: J = None
        self.x: E = None
        self.p: J = None
        self.w: J = None
        self.y: D = None
        self.txt = txt

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

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

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