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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.r: J = None
        self.s: J = None
        self.w: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: J = None
        self.u: E = None
        self.q: B = None
        self.v: A = None
        self.w: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.w: A = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: J = None
        self.z: E = None
        self.r: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: I = None
        self.u: G = None
        self.y: D = None
        self.v: C = None
        self.t: I = None
        self.r: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.r: J = None
        self.s: J = None
        self.w: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: J = None
        self.u: E = None
        self.q: B = None
        self.v: A = None
        self.w: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.w: A = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: J = None
        self.z: E = None
        self.r: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: I = None
        self.u: G = None
        self.y: D = None
        self.v: C = None
        self.t: I = None
        self.r: F = None
        self.txt = txt

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

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