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

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.x: A = None
        self.q: I = None
        self.w: E = None
        self.u: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.t: F = None
        self.z: E = None
        self.y: F = None
        self.o: E = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: A = None
        self.r: B = None
        self.p: D = None
        self.v: I = None
        self.t: F = None
        self.u: B = None
        self.w: I = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.x: A = None
        self.q: I = None
        self.w: E = None
        self.u: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.t: F = None
        self.z: E = None
        self.y: F = None
        self.o: E = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: A = None
        self.r: B = None
        self.p: D = None
        self.v: I = None
        self.t: F = None
        self.u: B = None
        self.w: I = None
        self.txt = txt

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

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

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

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